Update and fix worker

This commit is contained in:
2025-11-11 03:02:24 +07:00
parent e8e2ec5a43
commit 4a8c22e52a
4 changed files with 105 additions and 6 deletions

View File

@@ -52,6 +52,12 @@ public interface IJobRepository
/// </summary>
Task<int> ResetStaleJobsAsync(int timeoutMinutes = 5);
/// <summary>
/// Resets all jobs (Running or Pending) assigned to a specific worker back to Pending status.
/// Used when a worker restarts to clear jobs from the previous instance.
/// </summary>
Task<int> ResetJobsByWorkerIdAsync(string workerId);
/// <summary>
/// Gets all running jobs assigned to a specific worker
/// </summary>