Repeated Task Manager
class RepeatedTaskManager @JvmOverloads constructor(meterRegistry: MeterRegistry = Metrics.globalRegistry)
Basic management of repeated tasks.
Functions
Link copied to clipboard
fun createTask(name: String, meterRegistry: MeterRegistry = this.meterRegistry, repeatedTaskConfig: RepeatedTaskConfig = RepeatedTaskConfig(), retryPolicy: suspend RetryFailure<Throwable>.() -> RetryInstruction = defaultThrowableRetryPolicy +
binaryExponentialBackoff(
base = repeatedTaskConfig.defaultJitterMs,
max = repeatedTaskConfig.defaultMaxDelayMs
), taskConfig: TaskConfig = TaskConfig(), task: (name: String, taskConfig: TaskConfig) -> Status): RepeatedTask
Creates the repeated task with the details supplied. If the repeated task already exists, a TaskAlreadyExistsException is thrown.
Link copied to clipboard
Link copied to clipboard
Returns true if a repeated task with the name supplied is running. If the task does not exist or is not running, return false.
Link copied to clipboard