MeVisLab Scripting Reference
|
#include <mlabClientJob.h>
Inherits QObject.
Public Types | |
enum | QoSClass { QoSBackground , QoSDefault , QoSUserInitiated } |
Public Slots | |
QString | applicationName () const |
void | cancel () |
QVariantMap | executionEnvironment () const |
QList< MLABClientExecutionRecord * > | executionLog () const |
int | executionTimeoutInSeconds () const |
QString | jobDescription () const |
qlonglong | jobID () const |
double | progress () const |
QString | progressMessagePattern () const |
QoSClass | qualityOfService () const |
void | setApplicationName (const QString &name) |
void | setEnvironmentVariable (const QString &varName, const QString &value) |
void | setExecutionEnvironment (const QVariantMap &env) |
void | setExecutionTimeoutInSeconds (int seconds) |
void | setJobDescription (const QString &descr) |
void | setProgressMessagePattern (const QString &pattern) |
void | setQualityOfService (QoSClass qos) |
void | setUserData (const QVariantMap &data) |
void | setUserName (const QString &name) |
void | setWeight (double weight) |
void | setWorkingDirectory (const QString &dir) |
QString | status () const |
qlonglong | submit () |
QVariantMap | userData () const |
QString | userName () const |
double | weight () const |
QString | workingDirectory () const |
Specifying the job to execute | |
Note that runMacro, runPythonScript, and setCommandLine are mutually exclusive (or rather will overwrite each other). | |
void | runMacro (const QString ¯oName, const QStringList &args=QStringList(), QoSClass qos=QoSDefault) |
void | runMacro (const QString ¯oName, QoSClass qos) |
void | runPythonScript (const QString &fileName, const QStringList &arguments=QStringList(), QoSClass qos=QoSDefault) |
void | runPythonScript (const QString &fileName, QoSClass qos) |
void | setCommandLine (const QString &executable, const QStringList &arguments) |
void | setCommandLineExecutable (const QString &exe) |
QString | commandLineExecutable () const |
void | setCommandLineArguments (const QStringList &args) |
QStringList | commandLineArguments () const |
Methods for conditional execution. | |
There can only ever be at most one condition for a job. | |
MLABClientJobCondition * | condition () const |
MLABClientJobCondition * | setWatchCondition (const QString &watchedDirectory, int coolDownTimeInSeconds) |
MLABClientJobCondition * | setDelayedCondition (int intervalInSeconds) |
MLABClientJobCondition * | setChainCondition (const QVariantList &jobIDs, const QVariantList &softJobIDs=QVariantList()) |
void | unsetCondition () |
Signals | |
void | jobRemoved () |
void | propertyChanged (const QString &propertyName) |
A wrapper for command-line batch jobs managed by the MeVisLabJobScheduler.
Created or obtained from a MLABJobSchedulerClient
The Quality of service (QoS) class categorizes work to be performed.
|
inlineslot |
Get the application name which scheduled this job.
|
slot |
Cancel a job.
This also removes the job from the job database permanently, even if it was already finished.
|
inlineslot |
Get the command line arguments of this job.
|
inlineslot |
Get the command line executable for this job.
|
inlineslot |
Get condition that must be fulfilled for execution (if any)
|
inlineslot |
Get the set of extra environment variables for the execution of this job.
|
inlineslot |
Get the list of execution records (start time, end time, exit code, log file name) of a job.
The list may contain more than one entry if the job has been run multiple times. (see MLABClientJobCondition::setRepeating)
|
inlineslot |
Get the execution timeout.
|
inlineslot |
Get job description.
|
inlineslot |
Get ID of job (only after schedule() has been called)
|
signal |
This signal is emitted if the job itself has been removed.
You should not expect any meaningful changes to this job afterwards.
|
inlineslot |
Get current progress of job.
This may require to set the progressMessagePattern() to correctly extract the progress value from the executable's output.
|
inlineslot |
Get the progress message RegEx pattern.
|
signal |
This signal is emitted if any property of the job changes while watched.
The most important property changes are "status" and "progress".
|
inlineslot |
Get Quality of service (QoS) class for this job.
|
slot |
Set up the batch job to run the MeVisLab macro module with the settings of the current MeVisLab instance.
Referenced by runMacro().
|
inlineslot |
Same as above, but without an argument list.
References runMacro().
|
slot |
Run a Python script with the MeVisPython python interpreter.
Note that this is pure Python and the packages and objects provided by MeVisLab are not available.
Referenced by runPythonScript().
|
inlineslot |
Same as above, but without an argument list.
References runPythonScript().
|
inlineslot |
Set the application name which schedules this job.
|
slot |
Set a chain condition: The job is executed after the jobs with the given IDs have been executed successfully.
The optional second argument lists jobs this jobs only waits for; these jobs have to run, but not successfully.
|
slot |
Set the command line to execute for this job.
|
inlineslot |
Set the command line arguments for this job.
|
inlineslot |
Set the command line executable to execute for this job.
|
slot |
Set a delay condition: The job is executed after the given number of seconds.
|
slot |
Set a single environment variable for the execution of this job.
|
inlineslot |
Set a set of extra environment variables (as a dictionary) for the execution of this job.
|
inlineslot |
Set an execution timeout in seconds for this job.
If the job takes longer to execute, it will be considered as failed and killed.
|
inlineslot |
Set a job description.
|
inlineslot |
Set a progress message RegEx pattern, that will be used to parse output from the execution for a progress value.
The pattern must match a whole line, and the first sub-expression in braces must match a (float) number between 0 and 100.
|
inlineslot |
Set Quality of service (QoS) class for this job.
By specifying the quality of a job, you indicate its importance to your app. When scheduling jobs, the scheduler prioritizes those that have higher service classes.
|
inlineslot |
Set arbitrary user data (a dictionary) to associate with this job.
|
inlineslot |
Set the user for which this job is scheduled.
|
slot |
Set a watch condition: The job is executed when a change occurs in the given directory, but only the given number of seconds after the last change.
|
slot |
Set execution "weight" of job, that is, how taxing for the system the job is in relation to others.
The default value is 1.
This value is used to decide how many jobs can run in parallel, and is compared against an abstract execution "budget".
|
inlineslot |
Set the working directory to use for the execution of this job.
|
inlineslot |
Get current status of job.
This can be one of "Waiting", "ReadyToRun", "Starting", "Running", "Finished", or "Failed".
|
slot |
Submit the new job for scheduling.
Returns the newly assigned job ID.
|
slot |
Unset the previously set condition.
|
inlineslot |
Get user data for this job.
|
inlineslot |
Get the user for which this job was scheduled.
|
inlineslot |
Get execution weight of this job.
|
inlineslot |
Get the working directory for the execution of this job.