Pārlūkot izejas kodu

fix(cancel-task): log current cancellationRequested from board

After markCancelled(force: true), the pre-cancellation job snapshot's
cancellationRequested is stale (false). Read from the board so the
operational log reflects the forced state.

Addresses review feedback on PR #652.
Michael Henke 1 mēnesi atpakaļ
vecāks
revīzija
ff44fba3db
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      src/tools/cancel-task.ts

+ 4 - 1
src/tools/cancel-task.ts

@@ -162,7 +162,10 @@ Use only for obsolete, wrong, conflicting, or user-requested cancellation. Accep
         taskID: job.taskID,
         alias: options.backgroundJobBoard.field(job.taskID, 'alias'),
         state,
-        cancellationRequested: job.cancellationRequested,
+        cancellationRequested: options.backgroundJobBoard.field(
+          job.taskID,
+          'cancellationRequested',
+        ),
       });
 
       return [