Ejemplo n.º 1
0
        public void WaitForDrugRecord()
        {
            Thread.CurrentThread.Name = "Drugs";

            try
            {
                var p = new PollDrug(MotSqlServer, _mutex, GatewayIp, GatewayPort);
                p.UseAscii = this.UseAscii;

                while (KeepRunning)
                {
                    try
                    {
                        p.ReadDrugRecords();
                    }
                    catch (RowNotInTableException)
                    {
                        ;
                    }

                    Thread.Sleep(RefreshRate);
                }

                Console.WriteLine("Drug thread exiting");
            }
            catch (Exception ex)
            {
                EventLogger.Error($"Failed in Prescriber {ex.Message}");
            }
        }
        public void WaitForDrugRecord()
        {
            try
            {
                var p = new PollDrug(MotSqlServer, _mutex, GatewayIp, GatewayPort);

                while (KeepRunning)
                {
                    p.ReadDrugRecords();
                    Thread.Sleep(RefreshRate);
                }
            }
            catch (Exception ex)
            {
                EventLogger.Error($"Failed in Prescriber {ex.Message}");
            }
        }