mirror of
https://github.com/actions/runner.git
synced 2025-12-13 00:36:29 +00:00
Cleanup
This commit is contained in:
13
.vscode/launch.json
vendored
13
.vscode/launch.json
vendored
@@ -12,10 +12,7 @@
|
|||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}/src",
|
"cwd": "${workspaceFolder}/src",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"requireExactSource": false,
|
"requireExactSource": false
|
||||||
"env": {
|
|
||||||
"USE_BROKER_FLOW": "1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Run",
|
"name": "Run",
|
||||||
@@ -27,10 +24,7 @@
|
|||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}/src",
|
"cwd": "${workspaceFolder}/src",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"requireExactSource": false,
|
"requireExactSource": false
|
||||||
"env": {
|
|
||||||
"USE_BROKER_FLOW": "1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Configure",
|
"name": "Configure",
|
||||||
@@ -60,4 +54,5 @@
|
|||||||
"requireExactSource": false
|
"requireExactSource": false
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ namespace GitHub.Runner.Listener
|
|||||||
private TaskAgentStatus runnerStatus = TaskAgentStatus.Online;
|
private TaskAgentStatus runnerStatus = TaskAgentStatus.Online;
|
||||||
private CancellationTokenSource _getMessagesTokenSource;
|
private CancellationTokenSource _getMessagesTokenSource;
|
||||||
private IBrokerServer _brokerServer;
|
private IBrokerServer _brokerServer;
|
||||||
private string lastRunnerRequestId;
|
|
||||||
|
|
||||||
public override void Initialize(IHostContext hostContext)
|
public override void Initialize(IHostContext hostContext)
|
||||||
{
|
{
|
||||||
@@ -80,20 +79,7 @@ namespace GitHub.Runner.Listener
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MessageUtil.IsRunServiceJob(message.MessageType))
|
return message;
|
||||||
{
|
|
||||||
var messageRef = StringUtil.ConvertFromJson<RunnerJobRequestRef>(message.Body);
|
|
||||||
|
|
||||||
if (messageRef.RunnerRequestId != lastRunnerRequestId)
|
|
||||||
{
|
|
||||||
lastRunnerRequestId = messageRef.RunnerRequestId;
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException) when (_getMessagesTokenSource.Token.IsCancellationRequested && !token.IsCancellationRequested)
|
catch (OperationCanceledException) when (_getMessagesTokenSource.Token.IsCancellationRequested && !token.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user