dgbowl / tomato

tomato: au-tomation without the pain!
https://dgbowl.github.io/tomato
GNU General Public License v3.0
4 stars 6 forks source link

Submitting queued jobs may not be robust #88

Open g-kimbell opened 2 weeks ago

g-kimbell commented 2 weeks ago
PeterKraus commented 1 week ago

Yes, this was a suspicion in 0.2.x. I am not sure where exactly the race condition was, though.

In 1.0, we avoid this by pulling the information about the daemon status only once per iteration, and then acting on this copy for the rest of the rest of the loop: https://github.com/dgbowl/tomato/blob/0a6c4d70185f193d92fb9dbe165b1c6cebbfb223/src/tomato/daemon/job.py#L245-L249