mirror of
https://github.com/actions/runner.git
synced 2025-12-14 13:43:33 +00:00
Include current runner status while getting messages (#2026)
* get messages with runner status * fixed l0 tests * PR feedback
This commit is contained in:
@@ -360,6 +360,8 @@ namespace GitHub.Runner.Listener
|
||||
bool runOnceJobReceived = false;
|
||||
jobDispatcher = HostContext.CreateService<IJobDispatcher>();
|
||||
|
||||
jobDispatcher.JobStatus += _listener.OnJobStatus;
|
||||
|
||||
while (!HostContext.RunnerShutdownToken.IsCancellationRequested)
|
||||
{
|
||||
TaskAgentMessage message = null;
|
||||
@@ -561,6 +563,7 @@ namespace GitHub.Runner.Listener
|
||||
{
|
||||
if (jobDispatcher != null)
|
||||
{
|
||||
jobDispatcher.JobStatus -= _listener.OnJobStatus;
|
||||
await jobDispatcher.ShutdownAsync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user