Class Avogadro::MoleQueue::BatchJob#
-
class BatchJob : public QObject#
The BatchJob class manages a collection of jobs that are configured using the same InputGenerator and MoleQueue options. For use with InputGeneratorDialog::configureBatchJob(BatchJob&).
Unnamed Group
-
inline void setInputGeneratorOptions(const QJsonObject &opts)#
Options for the input generator.
-
inline QJsonObject inputGeneratorOptions() const#
Options for the input generator.
Unnamed Group
-
inline void setMoleQueueOptions(const QJsonObject &opts)#
Options for MoleQueue.
-
inline QJsonObject moleQueueOptions() const#
Options for MoleQueue.
-
inline JobObject moleQueueJobTemplate() const#
Options for MoleQueue.
Unnamed Group
-
inline const InputGenerator &inputGenerator() const#
The internal InputGenerator.
-
inline InputGenerator &inputGenerator()#
The internal InputGenerator.
Public Types
-
enum 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.
Values:
-
enumerator Rejected#
-
enumerator Unknown#
-
enumerator None#
-
enumerator Accepted#
-
enumerator QueuedLocal#
-
enumerator Submitted#
-
enumerator QueuedRemote#
-
enumerator RunningLocal#
-
enumerator RunningRemote#
-
enumerator Finished#
-
enumerator Canceled#
-
enumerator Error#
-
enumerator Rejected#
-
typedef int BatchId#
Type used to identify a job within this batch. Unique to this object.
-
typedef int RequestId#
Type used to identify requests sent to the MoleQueue server.
-
typedef unsigned int ServerId#
Type used by MoleQueue to identify jobs. Unique across the connected MoleQueue server.
Public Functions
-
explicit BatchJob(QObject *parent = nullptr)#
Construct a new BatchJob object. If provided, ese scriptFilePath to setup the input generator.
-
explicit BatchJob(const QString &scriptFilePath, QObject *parent = nullptr)#
-
~BatchJob() override#
-
inline QString description() const#
A string that will be used in the MoleQueue interface to identify this batch job. Taken from the InputGenerator configured title.
-
inline JobState jobState(BatchId batchId) const#
- Returns:
The state of the job with the batch id batchId.
-
inline ServerId serverId(BatchId batchId) const#
- Returns:
The server id of the job with the batch id batchId.
-
inline JobObject jobObject(BatchId batchId) const#
- Returns:
The most recent JobObject for the job with the batch id batchId. These are updated for each change in job state.
-
inline bool hasUnfinishedJobs() const#
- Returns:
True if there are still running jobs.
-
inline int unfinishedJobCount() const#
- Returns:
The number of jobs that are running.
-
inline int finishedJobCount() const#
- Returns:
The number of completed jobs.
-
inline int jobCount() const#
- Returns:
The total number of jobs in the batch.
Public Slots
Signals
Public Static Functions
-
inline void setInputGeneratorOptions(const QJsonObject &opts)#