pyiron_base.jobs.job.extension.jobstatus.JobStatus#
- class pyiron_base.jobs.job.extension.jobstatus.JobStatus(initial_status: str = 'initialized', db: pyiron_base.database.generic.DatabaseAccess | pyiron_base.database.filetable.FileTable | None = None, job_id: int | None = None)[source]#
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
- __init__(initial_status: str = 'initialized', db: pyiron_base.database.generic.DatabaseAccess | pyiron_base.database.filetable.FileTable | None = None, job_id: int | None = None)[source]#
Methods
__init__([initial_status, db, job_id])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.
Attributes
Get the database which is responsible for this job.
Get the job id of the job this jobstatus is associated to.
Get the current status as string, it can be:
- property database: pyiron_base.database.generic.DatabaseAccess | pyiron_base.database.filetable.FileTable | None#
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: int#
Get the job id of the job this jobstatus is associated to. :returns: job id :rtype: int
- refresh_status() None[source]#
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: str#
- 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)