Skip to content

Commit

Permalink
handle more job status on SGE system (#491)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced job status tracking with the addition of new status
conditions for improved accuracy in job state representation.
- **Bug Fixes**
- Modified logic for determining job status to better reflect current
conditions, improving system responsiveness.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
thangckt and pre-commit-ci[bot] authored Sep 3, 2024
1 parent 39846ae commit 6c767cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dpdispatcher/machines/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def default_resources(self, resources):
pass

def check_status(self, job):
### https://softpanorama.org/HPC/Grid_engine/Queues/queue_states.shtml
job_id = job.job_id
status_line = None
if job_id == "":
Expand Down Expand Up @@ -294,10 +295,12 @@ def check_status(self, job):
else:
status_word = status_line.split()[4]
# dlog.info (status_word)
if status_word in ["qw"]:
if status_word in ["qw", "hqw", "t"]:
return JobStatus.waiting
elif status_word in ["r"]:
elif status_word in ["r", "Rr"]:
return JobStatus.running
elif status_word in ["Eqw", "dr", "dt"]:
return JobStatus.terminated
else:
return JobStatus.unknown

Expand Down

0 comments on commit 6c767cf

Please sign in to comment.