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); } } ); }
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); } } ); }