What is Nostr?
Sierra Whisker Bravo
npub1mcn…wtll
2024-09-05 12:21:09
in reply to nevent1q…vjwm

Sierra Whisker Bravo on Nostr: Just a wild guess but could a race condition between a subtask marking itself ...

Just a wild guess but could a race condition between a subtask marking itself complete and your “supervisor” process that checks if no subtasks are incomplete.

So when subtask 3 for example marks itself complete if your “supervisor” checks before your subtask 4 is added it would see all subtasks complete. A bandaid could be only marking a subtask complete after the next subtask is inserted.

Sounds like you’re using a DB to track the jobs. Is that because your workers are distributed?
Author Public Key
npub1mcneaunh0n9qy54sse0vr06nwhejzghumfjlmu3r54ugwx83qhlshqwtll