Skip to content

Commit 90fafcd

Browse files
correctly mark completed jobs oin gh as such in stuck detection
1 parent adfd897 commit 90fafcd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

PoolManager.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,13 @@ private async Task CheckForStuckJobs(List<GithubTargetConfiguration> targetConfi
490490
{
491491
_logger.LogWarning($"GHjob for {stuckJob.JobId} is null");
492492
}
493+
else if (ghJob.Status == "completed")
494+
{
495+
_logger.LogWarning($"GHjob status for {stuckJob.JobId} is {ghJob.Status} - Marking job accordingly");
496+
stuckJob.State = JobState.Completed;
497+
stuckJob.CompleteTime = DateTime.UtcNow;
498+
await db.SaveChangesAsync();
499+
}
493500
else if (ghJob.Status != "queued")
494501
{
495502
_logger.LogWarning($"GHjob status for {stuckJob.JobId} is {ghJob.Status}");

0 commit comments

Comments
 (0)