Ejemplo n.º 1
0
        public bool Deliver(string context, JObject message)
        {
            bool successful = true;

            try
            {
                RelayTask.Deliver(API.Client.Host, API.Client.ProjectID, API.Client.Token, context, message);
            }
            catch (Exception exc)
            {
                mLogger.LogWarning(exc, "Failed task delivery");
                successful = false;
            }
            return(successful);
        }
Ejemplo n.º 2
0
        private void OnNotification(Client client, BroadcastParams broadcastParams)
        {
            if (broadcastParams.Event != "queuing.relay.tasks")
            {
                return;
            }

            mLogger.LogDebug("TaskingAPI OnNotification");

            RelayTask taskingEventParams = null;

            try { taskingEventParams = broadcastParams.ParametersAs <RelayTask>(); }
            catch (Exception exc)
            {
                mLogger.LogWarning(exc, "Failed to parse TaskingEventParams");
                return;
            }

            OnTaskReceived?.Invoke(this, taskingEventParams);
        }
Ejemplo n.º 3
0
 protected virtual void OnTask(RelayTask eventParams)
 {
 }