DistributedTaskScheduling / JobAdder

Source code of the JobAdder project
GNU General Public License v3.0
2 stars 1 forks source link

Email logging improvements & Crash fix #187

Closed ammen99 closed 4 years ago

ammen99 commented 4 years ago

Instead of print() we should use logging.

Also, I noticed that there is a race condition: If at the moment we pause a job, a message comes which makes it crashed or done: The message will be queued on the socket, we update the database with paused state, then we send the command to the worker which does nothing since the job has crashed. However, after that, the server processes the Done/Crashed message and tries to change the job status from PAUSED to DONE/CANCELLED, which up to now would have crashed the server.

As a result, I we should allow this kind of transition.