Ejemplo n.º 1
0
        private void TmrServiceStatusCallback(Object o)
        {
            IAMDatabase db = null;

            try
            {
                db = new IAMDatabase(localConfig.SqlServer, localConfig.SqlDb, localConfig.SqlUsername, localConfig.SqlPassword);
                db.openDB();
                db.Timeout = 600;

                db.ServiceStatus("Report", JSON.Serialize2(new { host = Environment.MachineName, executing = executing }), null);

                db.closeDB();
            }
            catch { }
            finally
            {
                if (db != null)
                {
                    db.Dispose();
                }

                db = null;
            }
        }
Ejemplo n.º 2
0
        private void TmrServiceStatusCallback(Object o)
        {
            IAMDatabase db = null;

            try
            {
                db = new IAMDatabase(localConfig.SqlServer, localConfig.SqlDb, localConfig.SqlUsername, localConfig.SqlPassword);
                db.openDB();
                db.Timeout = 600;

                Double percent = 0;

                percent = ((Double)(filesProcessed) / (Double)filesToProcess) * 100F;

                if (Double.IsNaN(percent) || Double.IsInfinity(percent))
                {
                    percent = 0;
                }

                db.ServiceStatus("Inbound", JSON.Serialize2(new { host = Environment.MachineName, executing = executing, start_time = startTime.ToString("o"), last_status = last_status, total_files = filesToProcess, processed_files = filesProcessed, percent = percent }), null);

                db.closeDB();
            }
            catch { }
            finally
            {
                if (db != null)
                {
                    db.Dispose();
                }

                db = null;
            }
        }
Ejemplo n.º 3
0
        private void TmrServiceStatusCallback(Object o)
        {
            IAMDatabase db = null;

            try
            {
                db = new IAMDatabase(localConfig.SqlServer, localConfig.SqlDb, localConfig.SqlUsername, localConfig.SqlPassword);
                db.openDB();
                db.Timeout = 600;

                db.ServiceStatus("WorkflowProcessor", JSON.Serialize2(new { host = Environment.MachineName, executing = executing, start_time = startTime.ToString("o"), last_status = last_status }), null);

                db.closeDB();
            }
            catch { }
            finally
            {
                if (db != null)
                {
                    db.Dispose();
                }

                db = null;
            }
        }
Ejemplo n.º 4
0
        private void TmrServiceStatusCallback(Object o)
        {
            IAMDatabase db = null;

            try
            {
                db = new IAMDatabase(localConfig.SqlServer, localConfig.SqlDb, localConfig.SqlUsername, localConfig.SqlPassword);
                db.openDB();
                db.Timeout = 600;

                db.ServiceStatus("Engine", JSON.Serialize2(new { host = Environment.MachineName, executing = executing, start_time = startTime.ToString("o"), total_registers = totalReg, atual_register = atualReg, percent = iPercent, errors = errors, new_users = newUsers, ignored = ignored, thread_count = (queueManager != null ? queueManager.ThreadCount : 0), queue_count = (queueManager != null ? queueManager.QueueCount : 0), last_status = last_status, queue_description = (queueManager != null ? queueManager.QueueCount2 : "") }), null);

                db.closeDB();
            }
            catch { }
            finally
            {
                if (db != null)
                {
                    db.Dispose();
                }

                db = null;
            }
        }