pyiron_base.jobs.job.extension.jobstatus module

The JobStatus class belongs to the GenericJob object.

class pyiron_base.jobs.job.extension.jobstatus.JobStatus(initial_status='initialized', db=None, job_id=None)

Bases: object

The JobStatus object handles the different states a job could have. The available states are:

initialized: The object for the corresponding job was just created. appended: The job was appended to an master job. created: The files required for the simulation were written to the harddisk. submitted: The job was submitted to the jobscheduler and is waiting to be executed. running: The job is currently executed. aborted: The job failed to execute. collect: The job finished successfully and the written files are being collected. suspended: The job was set to sleep, waiting until other related jobs are finished, before it continous. refresh: The job was suspended before and it is currently checking if there are new tasks it can execute. busy: The job is refreshing, but during the refresh more related jobs finished so another refresh is necessary. finished: The job and all connected sub jobs are finished. warning: The job finished but encountered warnings in its output.

Parameters:
  • initial_status (str) – If no initial status is provided the status is set to ‘initialized’

  • db (DatabaseAccess) – The database which is responsible for this job.

  • job_id (int) – job ID

.. attribute:: database

the database which is responsible for this job.

.. attribute:: job_id

Job ID

.. attribute:: string

job status as string

property database

Get the database which is responsible for this job. If no database is linked it returns None. :returns: The database which is responsible for this job. :rtype: DatabaseAccess

property job_id

Get the job id of the job this jobstatus is associated to. :returns: job id :rtype: int

refresh_status()

Refresh the job status - check if the database and job_id are set and if this is the case load the job status from the database.

property string
Get the current status as string, it can be:

initialized: The object for the corresponding job was just created. appended: The job was appended to an master job. created: The files required for the simulation were written to the harddisk. submitted: The job was submitted to the jobscheduler and is waiting to be executed. running: The job is currently executed. aborted: The job failed to execute. collect: The job finished successfully and the written files are being collected. suspended: The job was set to sleep, waiting until other related jobs are finished, before it continous. refresh: The job was suspended before and it is currently checking if there are new tasks it can execute. busy: The job is refreshing, but during the refresh more related jobs finished so another refresh is necessary. finished: The job and all connected sub jobs are finished. warning: The job finished but encountered warnings in its output.

Returns:

status [initialized, appended, created, submitted, running, aborted, collect, suspended, refresh,

busy, finished, warning]

Return type:

(str)

pyiron_base.jobs.job.extension.jobstatus.format_docstring_with_statuses(n_tabs=1)

Replaces a ‘{}’ in the decorated object’s docstring with the documentation for all possible job status.

The intent here is to have a single place where all status-value documentation can be maintained.

Parameters:

n_tabs (int) – The number of tabs preceding each status type. (Default is one)