pyiron_base.jobs.master.submissionstatus module
The SubmissionStatus class belongs to the GenericJob object. It is presently used only for the parallel master class.
- class pyiron_base.jobs.master.submissionstatus.SubmissionStatus(initial_status='initialized', db=None, job_id=None)
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']
- 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.
- Return type:
- property finished
Check if the status is ‘finished’, meaning the job and all connected sub jobs are finished.
- Returns:
[True/False]
- Return type:
bool
- property initialized
Check if the status is ‘initialized’, meaning the object for the corresponding job was just created.
- Returns:
[True/False]
- Return type:
bool
- refresh()
Refresh the submission status, if a job_id is present load the current submission status from the database.
- property string
- Get the current status as string, it can be:
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.
- Returns:
status [initialized, finished]
- Return type:
str
- submit_next()
Increasing the number of submitted jobs by one: self.submitted_jobs += 1
- property submitted
Check if the status is ‘submitted’, meaning the job has not yet submitted all jobs.
- Returns:
[True/False]
- Return type:
bool
- property submitted_jobs
Get the number of jobs which have been submitted.
- Returns:
number of submitted jobs
- Return type:
int
- property total_jobs
Get number of total jobs
- Returns:
number of total jobs
- Return type:
int