This commit is contained in:
Luke Tomlinson
2023-03-23 11:10:35 -07:00
parent 0989ee93d6
commit 0f8ed8f7fc
2 changed files with 5 additions and 24 deletions
+1 -15
View File
@@ -25,7 +25,6 @@ namespace GitHub.Runner.Listener
private TaskAgentStatus runnerStatus = TaskAgentStatus.Online;
private CancellationTokenSource _getMessagesTokenSource;
private IBrokerServer _brokerServer;
private string lastRunnerRequestId;
public override void Initialize(IHostContext hostContext)
{
@@ -80,20 +79,7 @@ namespace GitHub.Runner.Listener
continue;
}
if (MessageUtil.IsRunServiceJob(message.MessageType))
{
var messageRef = StringUtil.ConvertFromJson<RunnerJobRequestRef>(message.Body);
if (messageRef.RunnerRequestId != lastRunnerRequestId)
{
lastRunnerRequestId = messageRef.RunnerRequestId;
return message;
}
}
else
{
return message;
}
return message;
}
catch (OperationCanceledException) when (_getMessagesTokenSource.Token.IsCancellationRequested && !token.IsCancellationRequested)
{