The BatchJob class manages a collection of jobs that are configured using the same InputGenerator and MoleQueue options. For use with InputGeneratorDialog::configureBatchJob(BatchJob&).
#include <batchjob.h>
|
enum | JobState {
Rejected = -2
,
Unknown = -1
,
None = 0
,
Accepted
,
QueuedLocal
,
Submitted
,
QueuedRemote
,
RunningLocal
,
RunningRemote
,
Finished
,
Canceled
,
Error
} |
|
typedef int | BatchId |
|
typedef int | RequestId |
|
typedef unsigned int | ServerId |
|
◆ BatchId
Type used to identify a job within this batch. Unique to this object.
◆ RequestId
Type used to identify requests sent to the MoleQueue server.
◆ ServerId
Type used by MoleQueue to identify jobs. Unique across the connected MoleQueue server.
◆ JobState
Job status. Same as those defined in molequeueglobal.h. The 'Rejected' state is added to identify jobs that rejected by molequeue prior to having a MoleQueue id (ServerId) set.
◆ BatchJob()
Construct a new BatchJob object. If provided, ese scriptFilePath to setup the input generator.
◆ setInputGeneratorOptions()
void setInputGeneratorOptions |
( |
const QJsonObject & |
opts | ) |
|
Options for the input generator.
◆ inputGeneratorOptions()
QJsonObject inputGeneratorOptions |
( |
| ) |
const |
Options for the input generator.
◆ setMoleQueueOptions()
void setMoleQueueOptions |
( |
const QJsonObject & |
opts | ) |
|
◆ moleQueueOptions()
QJsonObject moleQueueOptions |
( |
| ) |
const |
◆ moleQueueJobTemplate()
◆ inputGenerator() [1/2]
◆ inputGenerator() [2/2]
◆ description()
QString description |
( |
| ) |
const |
A string that will be used in the MoleQueue interface to identify this batch job. Taken from the InputGenerator configured title.
◆ jobState()
- Returns
- The state of the job with the batch id batchId.
◆ serverId()
- Returns
- The server id of the job with the batch id batchId.
◆ jobObject()
- Returns
- The most recent JobObject for the job with the batch id batchId. These are updated for each change in job state.
◆ isTerminal()
- Returns
- True if state corresponds to a job that is finished running.
◆ hasUnfinishedJobs()
bool hasUnfinishedJobs |
( |
| ) |
const |
- Returns
- True if there are still running jobs.
◆ unfinishedJobCount()
int unfinishedJobCount |
( |
| ) |
const |
- Returns
- The number of jobs that are running.
◆ finishedJobCount()
int finishedJobCount |
( |
| ) |
const |
- Returns
- The number of completed jobs.
◆ jobCount()
- Returns
- The total number of jobs in the batch.
◆ submitNextJob
Submit a job using the current configuration for mol.
- Returns
- The BatchId of the job, or InvalidBatchId if there was an error.
◆ lookupJob
Request updated job details from the MoleQueue server for the job with the batch id batchId.
jobUpdated is emitted when the request is complete.
- Returns
- True if the request is sent.
◆ jobUpdated
Emitted when the reply from lookupJob is received. success will be false if MoleQueue sends an error response (likely because the job was removed from the job manager).
◆ jobCompleted
Emitted when the job associated with batchId completes. status is the final state of the jobs and can be used to determine whether or not the job finished successfully.
The documentation for this class was generated from the following file: