call run service renewjob (#2461)

* call run service renewjob

* format

* formatting

* make it private and expose internals

* lint

* fix exception class

* lint

* fix test as well
This commit is contained in:
Yashwanth Anantharaju
2023-02-27 11:50:28 -05:00
committed by GitHub
parent 0befa62f64
commit e8975514fd
10 changed files with 564 additions and 134 deletions

View File

@@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using GitHub.DistributedTask.WebApi;
using GitHub.Runner.Common;
using GitHub.Runner.Common.Util;
using GitHub.Runner.Listener.Check;
using GitHub.Runner.Listener.Configuration;
using GitHub.Runner.Sdk;
@@ -136,7 +137,7 @@ namespace GitHub.Runner.Listener
if (command.Remove)
{
// only remove local config files and exit
if(command.RemoveLocalConfig)
if (command.RemoveLocalConfig)
{
configManager.DeleteLocalRunnerConfig();
return Constants.Runner.ReturnCode.Success;
@@ -502,7 +503,7 @@ namespace GitHub.Runner.Listener
}
}
// Broker flow
else if (string.Equals(message.MessageType, JobRequestMessageTypes.RunnerJobRequest, StringComparison.OrdinalIgnoreCase))
else if (MessageUtil.IsRunServiceJob(message.MessageType))
{
if (autoUpdateInProgress || runOnceJobReceived)
{