pyiron.base.master.submissionstatus module

class pyiron.base.master.submissionstatus.SubmissionStatus(initial_status='initialized', db=None, job_id=None)[source]

Bases: object

The SubmissionStatus object handles the different submission states a job could have. The available states are:
initialized: No jobs have been submitted. sub_m_n: m out of n jobs have been submitted finished: The job and all connected sub jobs are finished.
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 – job ID
.. attribute:: database

the database which is responsible for this job.

.. attribute:: job_id

Job ID

.. attribute:: string

job status as string

.. attribute:: total_jobs

number of jobs which have to be submitted in total

.. attribute:: submitted_jobs

number of jobs which have been submitted

STATUS = ['initialized', 'finished']
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.
Return type:DatabaseAccess
finished

Check if the status is ‘finished’, meaning the job and all connected sub jobs are finished.

Returns:[True/False]
Return type:bool
initialized

Check if the status is ‘initialized’, meaning the object for the corresponding job was just created.

Returns:[True/False]
Return type:bool
refresh()[source]

Refresh the submission status, if a job_id is present load the current submission status from the database.

string
No jobs have been submitted.
sub_m_n: m out of n jobs have been submitted finished: The job and all connected sub jobs are finished.
Returns:status [initialized, finished]
Return type:str
Type:Get the current status as string, it can be
Type:initialized
submit_next()[source]

Increasing the number of submitted jobs by one: self.submitted_jobs += 1

submitted

Check if the status is ‘submitted’, meaning the job has not yet submitted all jobs.

Returns:[True/False]
Return type:bool
submitted_jobs

Get the number of jobs which have been submitted.

Returns:number of submitted jobs
Return type:int
total_jobs

Get number of total jobs

Returns:number of total jobs
Return type:int