Class which notifies subscribers when a job updates.
More...
#include <JobStatusNotifier.hpp>
Class which notifies subscribers when a job updates.
◆ subscribe() [1/2]
SubscriptionHandle rstudio::launcher_plugins::jobs::JobStatusNotifier::subscribe |
( |
const OnJobStatusUpdate & |
in_onJobStatusUpdate | ) |
|
Subscribes to all jobs.
- Parameters
-
in_onJobStatusUpdate | The function to be invoked when any job is updated. |
- Returns
- A handle to the job subscription. To end the subscription, allow the handle to fall out of scope.
◆ subscribe() [2/2]
SubscriptionHandle rstudio::launcher_plugins::jobs::JobStatusNotifier::subscribe |
( |
const std::string & |
in_jobId, |
|
|
const OnJobStatusUpdate & |
in_onJobStatusUpdate |
|
) |
| |
Subscribes to a specific job.
- Parameters
-
in_jobId | The ID of the job to subscribe to. |
in_onJobStatusUpdate | The function to be invoked when the job is updated. |
- Returns
- A handle to the job subscription. To end the subscription, allow the handle to fall out of scope.
◆ updateJob()
void rstudio::launcher_plugins::jobs::JobStatusNotifier::updateJob |
( |
const api::JobPtr & |
in_job, |
|
|
api::Job::State |
in_newStatus, |
|
|
const std::string & |
in_statusMessage = "" , |
|
|
const system::DateTime & |
in_invocationTime = system::DateTime() |
|
) |
| |
Updates the status of a job with a new status and optionally a new status message.
- Parameters
-
in_job | The job to be updated. |
in_newStatus | The new status of the job. |
in_statusMessage | The new status message of the job. Default: "". |
in_invocationTime | The time at which this method was invoked. Default: Current Time. If there is concern about time differences between the RStudio Launcher Host and the Job Scheduling System, this may be overridden with the time from the point of view of the Job Scheduling System. |
The documentation for this class was generated from the following file: