Skip to content

Commit

Permalink
send job notification after first request renew. (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingluoHuang authored Sep 1, 2016
1 parent de634ff commit 6512eb9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Agent.Listener/JobDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ private async Task RunAsync(AgentJobRequestMessage message, WorkerDispatcher pre
using (var lockRenewalTokenSource = new CancellationTokenSource())
using (var workerProcessCancelTokenSource = new CancellationTokenSource())
{
await notification.JobStarted(message.JobId);
long requestId = message.RequestId;
Guid lockToken = message.LockToken;

Expand All @@ -299,6 +298,10 @@ private async Task RunAsync(AgentJobRequestMessage message, WorkerDispatcher pre
return;
}

// we get first jobrequest renew succeed.
// send notification to machine provisioner.
await notification.JobStarted(message.JobId);

Task<int> workerProcessTask = null;
using (var processChannel = HostContext.CreateService<IProcessChannel>())
using (var processInvoker = HostContext.CreateService<IProcessInvoker>())
Expand Down

0 comments on commit 6512eb9

Please sign in to comment.