Schedules both the local and remote execution of workspaces. The SchedulerController manages the scheduling of workspaces. A workspace can be scheduled to run either locally or remotely. The SchedulerController determines the optimum number of jobs that can be run locally, once exceeded, any additional workspaces are then remoted (subject to the availability of remote workspace-servers and the suitability of the workspace to be scheduled). If a workspace fails to be executed remotely then the workspace is scheduled locally. Irrespective of the location of workspace execution the key workspace events i.e. Start/Stop execution and Start/Stop update are observed. Workspace events that occurr on a remote machine find their way back to the scheduler by way of network messages that are translated and re-emitted locally to provide the appearance of local execution. The SchedulerController also emits significant workspace and scheduler related events that can be observed in case additional notification and/or processing is required in response to these events.
#include <Workspace/DataExecution/Execution/schedulercontroller.h>
Inherits QObject.
◆ TypeOfPriorityChange
◆ TypeOfScheduler
Enumerator |
---|
ClientSideScheduler | |
ServerSideScheduler | |
WorkerScheduler | |
◆ abortRequest()
◆ abortScheduleWorkAllocatedTo()
Re-schedules all work scheduled to the server
◆ changePriorityOfDelayedRequest()
◆ cleanup
◆ decreaseMaxWorkload()
void decreaseMaxWorkload |
( |
| ) |
|
◆ delayRequestSignal
void delayRequestSignal |
( |
QString |
| ) |
|
|
signal |
◆ doRequest()
◆ getCountOfWork()
int getCountOfWork |
( |
| ) |
const |
◆ getCountOfWorkScheduled()
int getCountOfWorkScheduled |
( |
| ) |
const |
◆ getCountOfWorkScheduledOn()
◆ getFeatures()
◆ getIdealWorkload()
Returns the ideal number of tasks that can be executed in parallel.
- Returns
- The ideal task count.
◆ getInstance()
Returns a reference to the singleton scheduler.
◆ getLocalOccupiedFeatures()
◆ getMaxConcurrencyCount()
int getMaxConcurrencyCount |
( |
| ) |
const |
- Returns
- the maximum number of parallel jobs.
◆ getOccupiedFeaturesOnScheduler()
◆ getRemoteExecutionEnabled()
bool getRemoteExecutionEnabled |
( |
| ) |
const |
- Returns
- true if remote execution is enabled.
◆ getRequest()
◆ getTypeOfScheduler()
◆ getVersion()
Returns the version of the scheduler.
◆ getWorkflowOutputs() [1/2]
◆ getWorkflowOutputs() [2/2]
◆ handleExecutionStateChange()
void handleExecutionStateChange |
( |
bool |
running | ) |
|
◆ handleExecutionStateChangeSignal
void handleExecutionStateChangeSignal |
( |
bool |
| ) |
|
|
signal |
◆ haveRequest()
bool haveRequest |
( |
const QString & |
uuid | ) |
const |
◆ haveSchedulerWithFeatures()
◆ increaseMaxWorkload()
void increaseMaxWorkload |
( |
| ) |
|
◆ initialise() [1/2]
◆ initialise() [2/2]
◆ isPauseDelayed()
bool isPauseDelayed |
( |
| ) |
const |
◆ logText()
◆ onRequestHasAbortedUpdating()
void onRequestHasAbortedUpdating |
( |
QString |
uuid, |
|
|
bool |
hasErrorSource |
|
) |
| |
|
protected |
◆ onRequestHasFailedToBeScheduled()
void onRequestHasFailedToBeScheduled |
( |
QString |
uuid | ) |
|
|
protected |
◆ onRequestHasFinishedExecution()
void onRequestHasFinishedExecution |
( |
QString |
uuid | ) |
|
|
protected |
◆ onRequestHasFinishedUpdating()
void onRequestHasFinishedUpdating |
( |
QString |
uuid | ) |
|
|
protected |
◆ onRequestHasStartedExecuting()
void onRequestHasStartedExecuting |
( |
QString |
uuid | ) |
|
|
protected |
◆ onRequestHasStartedUpdating()
void onRequestHasStartedUpdating |
( |
QString |
uuid | ) |
|
|
protected |
◆ onRequestProgressEvent()
void onRequestProgressEvent |
( |
QString |
uuid, |
|
|
int |
percentComplete |
|
) |
| |
|
protected |
◆ pauseDelayed()
◆ removeScheduler()
void removeScheduler |
( |
QString |
schedulerType | ) |
|
◆ requestAbortRequest
◆ requestCompleted
void requestCompleted |
( |
QString |
| ) |
|
|
signal |
◆ requestHasAbortedUpdating
void requestHasAbortedUpdating |
( |
QString |
, |
|
|
bool |
hasError |
|
) |
| |
|
signal |
◆ requestHasFailedToBeScheduled
void requestHasFailedToBeScheduled |
( |
QString |
| ) |
|
|
signal |
◆ requestHasFinishedExecution
void requestHasFinishedExecution |
( |
QString |
| ) |
|
|
signal |
◆ requestHasFinishedUpdating
void requestHasFinishedUpdating |
( |
QString |
| ) |
|
|
signal |
◆ requestHasStartedExecuting
void requestHasStartedExecuting |
( |
QString |
| ) |
|
|
signal |
◆ requestHasStartedUpdating
void requestHasStartedUpdating |
( |
QString |
| ) |
|
|
signal |
◆ requestProgressUpdate
void requestProgressUpdate |
( |
QString |
uuid, |
|
|
int |
percentComplete |
|
) |
| |
|
signal |
◆ requestStartRequest
◆ requestStopRequest
void requestStopRequest |
( |
QString |
| ) |
|
|
signal |
◆ reScheduleWorkAllocatedTo()
Re-schedules all work scheduled to the server
◆ resumeDelayed()
◆ retryDelayed
◆ running()
◆ schedule()
- Parameters
-
request | The request to schedule for execution. |
As scheduling can be a non-trivial operation, scheduling is performed in an asynchronous fashion to avoid blocking the calling thread. Therefore, the request to be scheduled should not be destroyed by the caller of this function.
◆ setMaxConcurrencyCount()
void setMaxConcurrencyCount |
( |
int |
concurrencyCount | ) |
|
Sets the maximum number of workspaces that can be run in paralel. Providing a value that is <=0 will result in the scheduler determining the ideal thread count to use.
- Parameters
-
concurrencyCount | the maximum number of concurrently running workspaces |
◆ setRemoteExecutionEnabled()
void setRemoteExecutionEnabled |
( |
bool |
enable | ) |
|
Enables / disables remote execution.
◆ sortTaskIdsByDelayedRequest()
void sortTaskIdsByDelayedRequest |
( |
QStringList & |
uuids | ) |
const |
Sort the uuids by delayed request, for those not in the delayed request list put them in the begining and not change the order.
◆ start()
◆ started
◆ stop() [1/2]
◆ stop() [2/2]
void stop |
( |
QString |
uuid | ) |
|
Schedules the stopping of a request. As stopping can be a non-trivial operation, stopping is performed in an asynchronous fashion to avoid blocking the "stopping" thread, as such, the request to be stopped should not be destroyed by the caller of this function.
◆ stopped
◆ stopping
◆ workspaceLocalFeature
◆ workspaceQueueFeature