MeVisLab Scripting Reference
|
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 |
Returns the application name that scheduled this job.
|
slot |
Cancels a job.
This also removes the job from the job database permanently, even if it was already finished.
|
inlineslot |
Returns the command line arguments of this job.
|
inlineslot |
Returns the command line executable for this job.
|
inlineslot |
Returns a condition that must be fulfilled for execution (if any).
|
inlineslot |
Returns the set of extra environment variables for the execution of this job.
|
inlineslot |
REturns 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 |
Returns the execution timeout.
|
inlineslot |
Returns the job description.
|
inlineslot |
Returns the ID of the 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 |
Returns the current progress of the job.
This may require to set the progressMessagePattern() to correctly extract the progress value from the executable's output.
|
inlineslot |
Returns 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 |
Returns the quality of service (QoS) class for this job.
|
slot |
Sets 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 |
Runs 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 |
Sets the application name that schedules this job.
|
slot |
Sets 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 |
Sets the command line to execute for this job.
|
inlineslot |
Sets the command line arguments for this job.
|
inlineslot |
Sets the command line executable to execute for this job.
|
slot |
Sets a delay condition: The job is executed after the given number of seconds.
|
slot |
Sets a single environment variable for the execution of this job.
|
inlineslot |
Sets a set of extra environment variables (as a dictionary) for the execution of this job.
|
inlineslot |
Sets an execution timeout in seconds for this job.
If the job takes longer to execute, it will be considered as failed and killed.
|
inlineslot |
Sets a job description.
|
inlineslot |
Sets 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 subexpression in braces must match a (float) number between 0 and 100.
|
inlineslot |
Sets the 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 |
Sets arbitrary user data (a dictionary) to associate with this job.
|
inlineslot |
Sets the user for which this job is scheduled.
|
slot |
Sets 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 |
Sets the 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 |
Sets the working directory to use for the execution of this job.
|
inlineslot |
Returns the current status of the job.
This can be one of "Waiting", "ReadyToRun", "Starting", "Running", "Finished", or "Failed".
|
slot |
Submits the new job for scheduling.
Returns the newly assigned job ID.
|
slot |
Unsets the previously set condition.
|
inlineslot |
Returns user data for this job.
|
inlineslot |
Returns the user for which this job was scheduled.
|
inlineslot |
Returns the execution weight of this job.
|
inlineslot |
Returns the working directory for the execution of this job.