Exemplo n.º 1
0
        public override void Progress(ProgressMessage message)
        {
            message.TaskName = Name;

            IPubSubResult result = PubSubClient.Publish(new PubSubMessage
            {
                Event   = "task:onprogress",
                Channel = "panteon",
                Payload = message
            });

            Console.WriteLine(result.Body);
        }
Exemplo n.º 2
0
 private void Worker_Started(object sender, WorkerStartedEventArgs e)
 {
     try
     {
         IPubSubResult result = PubSubClient.Publish(new PubSubMessage
         {
             Event   = "task:onstarted",
             Channel = "panteon",
             Payload = new
             {
                 TaskName = Name
             }
         });
         Console.WriteLine(result.Body);
     }
     catch (Exception exception)
     {
         WorkerLogger.Error($"An error occurred while informing about [{Name}] starting operation.", exception);
     }
 }