cbrain icon indicating copy to clipboard operation
cbrain copied to clipboard

Add signal handler for INT, TERM and USR1 in AlterTask main loop

Open prioux opened this issue 4 years ago • 1 comments

That way we can kill the process and get it to finish up the current task before ending the loop early and properly.

Change $0 so it indicates the signal was received, too.

Code is in models/bourreau.rb

prioux avatar Feb 19 '21 17:02 prioux

Maybe we can do this for other background loops.

Maybe we could use the Worker framework instead, which already has support for that.

prioux avatar Feb 19 '21 17:02 prioux

Implemented in https://github.com/aces/cbrain/commit/1c156d565c54f3a539a0566993c1f0a12900dd72

(TERM signal only)

prioux avatar Nov 16 '22 20:11 prioux