Ejemplo n.º 1
0
        public void Start()
        {
            Task.Run(async() =>
            {
                while (!token.IsCancellationRequested)
                {
                    foreach (var entry in Jellyfish.Commands.Metrics.CommandMetricsFactory.GetInstances())
                    {
                        try
                        {
                            var publisher = new Jellyfish.Commands.Metrics.Publishers.JsonMetricsPublisherCommand(entry);
                            publisher.Run(UpdateEvent);
                        }
                        catch
                        {
                        }
                    }

                    await Task.Delay(delay);
                }
            }

                     );
        }
Ejemplo n.º 2
0
        public void Start()
        {
            Task.Run(async () =>
            {
                while (!token.IsCancellationRequested)
                {
                    foreach (var entry in Jellyfish.Commands.Metrics.CommandMetricsFactory.GetInstances())
                    {
                        try
                        {
                            var publisher = new Jellyfish.Commands.Metrics.Publishers.JsonMetricsPublisherCommand(entry);
                            publisher.Run(UpdateEvent);
                        }
                        catch
                        {
                        }
                    }

                    await Task.Delay(delay);
                }
            }

            );
        }