Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed capitalisation of job_states #1799

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aiida/scheduler/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class JobInfo(DefaultFieldsAttributeDict):
* ``annotation``: human-readable description of the reason for the job
being in the current state or substate.
* ``job_state``: the job state (one of those defined in
``aiida.scheduler.datastructures.job_states``)
``aiida.scheduler.datastructures.JOB_STATES``)
* ``job_substate``: a string with the implementation-specific sub-state
* ``allocated_machines``: a list of machines used for the current job.
This is a list of :py:class:`MachineInfo` objects.
Expand Down
6 changes: 3 additions & 3 deletions aiida/scheduler/plugins/direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
'Z': JOB_STATES.DONE,
# Not sure about these three, I comment them out (they used to be in
# here, but they don't appear neither on ubuntu nor on Mac)
# 'F': job_states.DONE,
# 'H': job_states.QUEUED_HELD,
# 'Q': job_states.QUEUED,
# 'F': JOB_STATES.DONE,
# 'H': JOB_STATES.QUEUED_HELD,
# 'Q': JOB_STATES.QUEUED,
}


Expand Down
4 changes: 2 additions & 2 deletions aiida/work/job_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,14 @@ def on_excepted(self):
"""The Process excepted so we set the calculation and scheduler state."""
super(JobProcess, self).on_excepted()
self.calc._set_state(calc_states.FAILED)
self.calc._set_scheduler_state(job_states.DONE)
self.calc._set_scheduler_state(JOB_STATES.DONE)

@override
def on_killed(self):
"""The Process was killed so we set the calculation and scheduler state."""
super(JobProcess, self).on_excepted()
self.calc._set_state(calc_states.FAILED)
self.calc._set_scheduler_state(job_states.DONE)
self.calc._set_scheduler_state(JOB_STATES.DONE)

@override
def update_outputs(self):
Expand Down