Off-by-one check for stale job tickets

This commit is contained in:
Ben Harris 2021-07-15 08:57:45 +08:00 committed by GitHub
parent 29ececda9b
commit 1958bd0934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -965,7 +965,7 @@
$LogPrintExit2 error $0 ("No script '" . $Script . "' is running!") true; $LogPrintExit2 error $0 ("No script '" . $Script . "' is running!") true;
} }
:if ([ :len ($ScriptLockOrder->$Script) ] > $JobCount) do={ :if ([ :len ($ScriptLockOrder->$Script) ] >= $JobCount) do={
$LogPrintExit2 error $0 ("More tickets than running scripts '" . $Script . "', resetting!") false; $LogPrintExit2 error $0 ("More tickets than running scripts '" . $Script . "', resetting!") false;
:set ($ScriptLockOrder->$Script); :set ($ScriptLockOrder->$Script);
/ system script job remove [ find where script=$Script ]; / system script job remove [ find where script=$Script ];