Add periodic checks by compute services that their claimed Task
s are actioned by at least one active AlchemicalNetwork
; halt execution and drop claim for those Task
s that are not
#301
Milestone
Currently, compute services like our
SynchronousComputeService
will continue executing a claimedTask
even if thatTask
is no longer wanted by any user, and no longer actioned on any activeAlchemicalNetwork
s. It will continue until execution has either succeeded or failed, and is largely a waste of compute resources that can come with additional opportunity cost if many suchTask
s saturate limited resources.Instead of this, we would like compute services to periodically check that their currently-claimed
Task
s are still actioned by at least one activeAlchemicalNetwork
. For thoseTask
s that are not, they should immediately drop their claim and attempt to halt their execution.To do this in the
SynchronousComputeService
, it will likely be necessary to makeProtocolUnit
execution happen in a subprocess, since otherwise it will not be possible forProtocolUnit
s executed in-process to be cleanly halted if the conditions above are met. The subprocess can then beSIGTERM
ed orSIGKILL
ed by the calling process.The text was updated successfully, but these errors were encountered: