#include <molequeue/jobdata.h>
Internal container for job details.
- Author
- Allison Vacanti
Each JobData instance stores information about a specific job. All JobData objects are owned by a JobManager, which dispenses JobReferenceBase subclasses (Job and JobRequest) that are used to interact with the JobData members.
◆ jobManager()
◆ setQueue()
| void setQueue |
( |
const QString & | newQueue | ) |
|
- Parameters
-
| newQueue | name of the queue. |
◆ queue()
- Returns
- Name of queue to use.
◆ setProgram()
| void setProgram |
( |
const QString & | newProgram | ) |
|
- Parameters
-
| newProgram | Name of the program. |
◆ program()
| QString program |
( |
| ) |
const |
- Returns
- Name of program to run.
◆ setJobState()
| void setJobState |
( |
JobState | state | ) |
|
◆ jobState()
| JobState jobState |
( |
| ) |
const |
◆ setDescription()
| void setDescription |
( |
const QString & | newDesc | ) |
|
- Parameters
-
| newDesc | Description of job |
◆ description()
| QString description |
( |
| ) |
const |
- Returns
- newDesc Description of job
◆ setInputFile()
◆ inputFile()
◆ setAdditionalInputFiles()
- Parameters
-
| files | FileSpecification objects describing additional input files to be placed in the working directory of the job prior to execution. |
◆ additionalInputFiles()
- Returns
- FileSpecification objects describing additional input files to be placed in the working directory of the job prior to execution.
◆ additionalInputFilesRef()
- Returns
- A reference to the additional input files list.
◆ setOutputDirectory()
| void setOutputDirectory |
( |
const QString & | path | ) |
|
- Parameters
-
| path | String containing a location to copy the output files to after the job completes. Ignored if empty. |
◆ outputDirectory()
| QString outputDirectory |
( |
| ) |
const |
- Returns
- String containing a location to copy the output files to after the job completes. Ignored if empty.
◆ setLocalWorkingDirectory()
| void setLocalWorkingDirectory |
( |
const QString & | path | ) |
|
- Parameters
-
| path | Temporary working directory where files are stored during job execution. |
◆ localWorkingDirectory()
| QString localWorkingDirectory |
( |
| ) |
const |
- Returns
- Temporary working directory where files are stored during job execution.
◆ setCleanRemoteFiles()
| void setCleanRemoteFiles |
( |
bool | clean | ) |
|
- Parameters
-
| clean | If true, delete any working files on the remote server. Default: false. |
◆ cleanRemoteFiles()
| bool cleanRemoteFiles |
( |
| ) |
const |
- Returns
- If true, delete any working files on the remote server. Default: false.
◆ setRetrieveOutput()
| void setRetrieveOutput |
( |
bool | b | ) |
|
- Parameters
-
| b | If true, copies files back from remote server. Default: true |
◆ retrieveOutput()
| bool retrieveOutput |
( |
| ) |
const |
- Returns
- If true, copies files back from remote server. Default: true
◆ setCleanLocalWorkingDirectory()
| void setCleanLocalWorkingDirectory |
( |
bool | b | ) |
|
- Parameters
-
| b | If true, the local working files are removed after job is complete. Should be used with setOutputDirectory. Default: false |
◆ cleanLocalWorkingDirectory()
| bool cleanLocalWorkingDirectory |
( |
| ) |
const |
- Returns
- If true, the local working files are removed after job is complete. Should be used with setOutputDirectory. Default: false
◆ setHideFromGui()
| void setHideFromGui |
( |
bool | b | ) |
|
- Parameters
-
| b | If true, the job will not appear in the queue. Default: false |
◆ hideFromGui()
| bool hideFromGui |
( |
| ) |
const |
- Returns
- If true, the job will not appear in the queue. Default: false
◆ setPopupOnStateChange()
| void setPopupOnStateChange |
( |
bool | b | ) |
|
- Parameters
-
| b | If true, changes in the job state will trigger a popup notification from the MoleQueue system tray icon. Default: false |
◆ popupOnStateChange()
| bool popupOnStateChange |
( |
| ) |
const |
- Returns
- If true, changes in the job state will trigger a popup notification from the MoleQueue system tray icon. Default: false
◆ setNumberOfCores()
| void setNumberOfCores |
( |
int | num | ) |
|
- Parameters
-
| num | The total number of processor cores to use (if applicable). Default: 1 |
◆ numberOfCores()
| int numberOfCores |
( |
| ) |
const |
- Returns
- The total number of processor cores to use (if applicable). Default: 1
◆ setMaxWallTime()
| void setMaxWallTime |
( |
int | minutes | ) |
|
- Parameters
-
| minutes | The maximum walltime for this job in minutes. Setting this to a value <= 0 will use the queue-specific default max walltime. Only available for remote queues. Default is -1. |
◆ maxWallTime()
| int maxWallTime |
( |
| ) |
const |
- Returns
- The maximum walltime for this job in minutes. Setting this to a value <= 0 will use the queue-specific default max walltime. Only available for remote queues. Default is -1.
◆ setMoleQueueId()
| void setMoleQueueId |
( |
IdType | id | ) |
|
- Parameters
-
| id | Internal MoleQueue identifier |
◆ moleQueueId()
| IdType moleQueueId |
( |
| ) |
const |
- Returns
- Internal MoleQueue identifier
◆ setQueueId()
| void setQueueId |
( |
IdType | id | ) |
|
◆ queueId()
◆ keywordsRef()
| QHash< QString, QString > & keywordsRef |
( |
| ) |
|
- Returns
- A reference to the job's keyword hash
◆ setKeywords()
| void setKeywords |
( |
const QHash< QString, QString > & | keyrep | ) |
|
- Parameters
-
| keyrep | The keyword replacement hash |
◆ keywords()
| QHash< QString, QString > keywords |
( |
| ) |
const |
- Returns
- The keyword replacement hash
◆ toJsonObject()
| QJsonObject toJsonObject |
( |
| ) |
const |
- Returns
- The Job's internal state as a QJsonObject
◆ setFromJson()
| void setFromJson |
( |
const QJsonObject & | state | ) |
|
Update the Job's internal state from a QJsonObject.
◆ load()
| bool load |
( |
const QString & | stateFilename | ) |
|
Initialize the JobData from the state in JSON file stateFileName.
◆ save()
Write a mqjobinfo.json file to the JobData's local working directory with the job state.
◆ needsSync()
◆ modified()
Called when the JobData is modified.
◆ m_jobManager
◆ m_queue
◆ m_program
◆ m_jobState
◆ m_description
◆ m_inputFile
◆ m_additionalInputFiles
FileSpecification objects describing additional input files, to be placed in the working directory of the job prior to execution.
◆ m_outputDirectory
| QString m_outputDirectory |
|
protected |
String containing a location to copy the output files to after the job completes. Ignored if empty.
◆ m_localWorkingDirectory
| QString m_localWorkingDirectory |
|
protected |
Temporary working directory where files are stored during job execution.
◆ m_cleanRemoteFiles
If true, delete any working files on the remote server. Default: false.
◆ m_retrieveOutput
If true, copies files back from remote server. Default: true.
◆ m_cleanLocalWorkingDirectory
| bool m_cleanLocalWorkingDirectory |
|
protected |
If true, the local working files are removed after job is complete. Should be used with setOutputDirectory. Default: false
◆ m_hideFromGui
If true, the job will not appear in the queue. Default: false.
◆ m_popupOnStateChange
| bool m_popupOnStateChange |
|
protected |
If true, changes in the job state will trigger a popup notification from the MoleQueue system tray icon. Default: true
◆ m_numberOfCores
The total number of processor cores to use (if applicable). Default: 1
◆ m_maxWallTime
The maximum walltime for this job in minutes. Setting this to a value <= 0 will use the queue-specific default max walltime. Only available for remote queues. Default is -1.
◆ m_moleQueueId
Internal MoleQueue identifier.
◆ m_queueId
◆ m_keywords
| QHash<QString, QString> m_keywords |
|
protected |
List of custom keyword replacements for the job's launch script.
◆ m_needsSync
The documentation for this class was generated from the following file: