Skip to content

Commit

Permalink
fix: prevent accidental job revert of a RUNNING job [DHIS2-18752] (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
jbee authored Jan 14, 2025
1 parent 5b2be03 commit 8067233
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ public boolean tryRevertNow(@Nonnull String jobId) {
else schedulingtype end
where jobstatus = 'RUNNING'
and uid = :id
and now() > jobconfiguration.lastalive + interval '1 minute'
""";
return nativeSynchronizedQuery(sql).setParameter("id", jobId).executeUpdate() > 0;
}
Expand Down

0 comments on commit 8067233

Please sign in to comment.