Skip to content

Commit bb7dcd9

Browse files
committed
Temporarily disable status.
1 parent afbe002 commit bb7dcd9

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

wes_service/toil_wes.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -199,29 +199,29 @@ def getstate(self):
199199
state = "RUNNING"
200200
exit_code = -1
201201

202-
exitcode_file = os.path.join(self.workdir, "exit_code")
203-
204-
if os.path.exists(exitcode_file):
205-
with open(exitcode_file) as f:
206-
exit_code = int(f.read())
207-
elif os.path.exists(self.pidfile):
208-
with open(self.pidfile, "r") as pid:
209-
pid = int(pid.read())
210-
try:
211-
(_pid, exit_status) = os.waitpid(pid, os.WNOHANG)
212-
if _pid != 0:
213-
exit_code = exit_status >> 8
214-
with open(exitcode_file, "w") as f:
215-
f.write(str(exit_code))
216-
os.unlink(self.pidfile)
217-
except OSError:
218-
os.unlink(self.pidfile)
219-
exit_code = 255
220-
221-
if exit_code == 0:
222-
state = "COMPLETE"
223-
elif exit_code != -1:
224-
state = "EXECUTOR_ERROR"
202+
# exitcode_file = os.path.join(self.workdir, "exit_code")
203+
#
204+
# if os.path.exists(exitcode_file):
205+
# with open(exitcode_file) as f:
206+
# exit_code = int(f.read())
207+
# elif os.path.exists(self.pidfile):
208+
# with open(self.pidfile, "r") as pid:
209+
# pid = int(pid.read())
210+
# try:
211+
# (_pid, exit_status) = os.waitpid(pid, os.WNOHANG)
212+
# if _pid != 0:
213+
# exit_code = exit_status >> 8
214+
# with open(exitcode_file, "w") as f:
215+
# f.write(str(exit_code))
216+
# os.unlink(self.pidfile)
217+
# except OSError:
218+
# os.unlink(self.pidfile)
219+
# exit_code = 255
220+
#
221+
# if exit_code == 0:
222+
# state = "COMPLETE"
223+
# elif exit_code != -1:
224+
# state = "EXECUTOR_ERROR"
225225

226226
return state, exit_code
227227

0 commit comments

Comments
 (0)