Package wisp.task

Types

Link copied to clipboard
class RepeatedTask @JvmOverloads constructor(name: String, meterRegistry: MeterRegistry, repeatedTaskConfig: RepeatedTaskConfig, retryPolicy: suspend RetryFailure<Throwable>.() -> RetryInstruction, taskConfig: TaskConfig, task: (name: String, taskConfig: TaskConfig) -> Status)

A RepeatedTask runs a repeated task at the user controlled rate.

Link copied to clipboard
data class RepeatedTaskConfig @JvmOverloads constructor(timeBetweenRunsMs: Long, initialDelayMs: Long, defaultJitterMs: Long, defaultMaxDelayMs: Long) : Config
Link copied to clipboard
class RepeatedTaskManager @JvmOverloads constructor(meterRegistry: MeterRegistry)

Basic management of repeated tasks.

Link copied to clipboard
class RepeatedTaskMetrics(meterRegistry: MeterRegistry)

Metrics for repeated tasks:

Link copied to clipboard
enum Status : Enum<Status>
Link copied to clipboard
open class TaskConfig : Config

Config to pass to the task. Extend this to pass in anything else your task may need.

Properties

Link copied to clipboard
val defaultThrowableRetryPolicy: RetryPolicy<Throwable>

By default, continue retrying