private void SendRemote(CommandJob job, CommandJobTask subtask, StitchSummary stitch)
        {
            var request = CreateRemoteRequest(stitch);

            request.Target = stitch.Id;
            _sender.SendCommandRequest(stitch.NetworkNodeId, request, job, subtask);
        }
        protected override void SendLocal(CommandJob job, CommandJobTask subtask, StitchSummary stitch)
        {
            // TODO: Publish status async here and rely on the job to communicate status of the
            // request. We will need a new mechanism for this and new message types
            bool ok = _stitches.StopInstance(stitch.Id);

            subtask.Status = ok ? JobStatusType.Success : JobStatusType.Failure;
        }
 protected abstract void SendLocal(CommandJob job, CommandJobTask subtask, StitchSummary stitch);
Exemple #4
0
            public void SendCommandRequest(string networkNodeId, CommandRequest request, CommandJob job, CommandJobTask task)
            {
                request.SetJobDetails(job.Id, task.Id);
                var message = new ClusterMessageBuilder()
                              .FromNode()
                              .ToNode(networkNodeId)
                              .WithObjectPayload(request)
                              .Build();

                Send(message);
            }