File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
parsl/executors/high_throughput Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -335,14 +335,17 @@ def pull_tasks(self, kill_event):
335335 self .heartbeat_to_incoming ()
336336 last_beat = time .time ()
337337
338- if self . drain_time and time .time () > self .drain_time :
338+ if time .time () > self .drain_time :
339339 logger .info ("Requesting drain" )
340340 self .drain_to_incoming ()
341- self .drain_time = None
342341 # This will start the pool draining...
343342 # Drained exit behaviour does not happen here. It will be
344343 # driven by the interchange sending a DRAINED_CODE message.
345344
345+ # now set drain time to the far future so we don't send a drain
346+ # message every iteration.
347+ self .drain_time = float ('inf' )
348+
346349 poll_duration_s = max (0 , next_interesting_event_time - time .time ())
347350 socks = dict (poller .poll (timeout = poll_duration_s * 1000 ))
348351
You can’t perform that action at this time.
0 commit comments