File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ class WorkflowKillSwitch(Exception):
1818 """When processStatus != "success" and on-error=kill, raise this exception."""
1919
2020 def __init__ (self , job_id , rcode ):
21+ """Record the job identifier and the error code."""
2122 self .job_id = job_id
2223 self .rcode = rcode
2324
2425 def __str__ (self ):
25- return f'[job { self .job_id } ] activated kill switch with return code { self .rcode } '
26+ """Represent this exception as a string."""
27+ return f"[job { self .job_id } ] activated kill switch with return code { self .rcode } "
Original file line number Diff line number Diff line change @@ -547,7 +547,8 @@ def monitor_kill_switch() -> None:
547547 nonlocal ks_tm
548548 if kill_switch .is_set ():
549549 _logger .error ("[job %s] terminating by kill switch" , self .name )
550- if sproc .stdin : sproc .stdin .close ()
550+ if sproc .stdin :
551+ sproc .stdin .close ()
551552 sproc .terminate ()
552553 else :
553554 ks_tm = Timer (interval = 1 , function = monitor_kill_switch )
Original file line number Diff line number Diff line change 77import threading
88from typing import Callable , Optional
99
10- from .loghandler import _logger
1110from .errors import WorkflowKillSwitch
11+ from .loghandler import _logger
1212
1313
1414class TaskQueue :
You can’t perform that action at this time.
0 commit comments