Repeated Task Manager
class RepeatedTaskManager @JvmOverloads constructor(meterRegistry: MeterRegistry)
Content copied to clipboard
Basic management of repeated tasks.
Constructors
Link copied to clipboard
fun RepeatedTaskManager(meterRegistry: MeterRegistry = Metrics.globalRegistry)
Content copied to clipboard
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
Content copied to clipboard
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