This commit is contained in:
eric sciple
2022-05-24 06:50:19 +00:00
committed by GitHub
parent eeeff071c7
commit 660784ecbe
3 changed files with 6 additions and 3 deletions

View File

@@ -3,9 +3,11 @@ using System.Runtime.Serialization;
namespace GitHub.Runner.Listener
{
[DataContract]
public sealed class MessageRef
public sealed class RunnerJobRequestRef
{
[DataMember(Name = "id")]
public string Id { get; set; }
[DataMember(Name = "runner_request_id")]
public string RunnerRequestId { get; set; }
}
}

View File

@@ -471,7 +471,7 @@ namespace GitHub.Runner.Listener
}
else
{
var messageRef = StringUtil.ConvertFromJson<MessageRef>(message.Body);
var messageRef = StringUtil.ConvertFromJson<RunnerJobRequestRef>(message.Body);
// Create connection
var credMgr = HostContext.GetService<ICredentialManager>();
@@ -480,7 +480,7 @@ namespace GitHub.Runner.Listener
// todo: add retries
var runServer = HostContext.CreateService<IRunServer>();
await runServer.ConnectAsync(new Uri(settings.ServerUrl), creds);
var jobMessage = await runServer.GetJobMessageAsync(messageRef.Id);
var jobMessage = await runServer.GetJobMessageAsync(messageRef.RunnerRequestId);
jobDispatcher.Run(jobMessage, runOnce);
if (runOnce)

View File

@@ -57,6 +57,7 @@ namespace GitHub.Runner.Sdk
settings.SendTimeout = TimeSpan.FromSeconds(Math.Min(Math.Max(httpRequestTimeoutSeconds, 100), 1200));
}
settings.AllowAutoRedirect = true;
// Remove Invariant from the list of accepted languages.
//