Skip to content

Commit

Permalink
job status deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
joknarf committed Jun 30, 2024
1 parent 543763d commit 2ddeeec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssh_para/ssh_para.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,14 +653,14 @@ def exec(self, th_id, dirlog):
status = "RUNNING",
pid = p.pid,
)
printq.put(deepcopy(jstatus)) # python bug threading !!
printq.put(deepcopy(jstatus))
p.wait()
fdout.close()
endq.put(th_id)
jstatus.exit = p.returncode
jstatus.duration = time() - jstatus.start
jstatus.status = "SUCCESS" if jstatus.exit == 0 else "FAILED"
printq.put(jstatus)
printq.put(deepcopy(jstatus))
with open(f"{dirlog}/{self.host}.status", "w", encoding="UTF-8") as fstatus:
print(
"EXIT CODE:",
Expand Down

0 comments on commit 2ddeeec

Please sign in to comment.