RepeatConfig

ox.scheduling.RepeatConfig
See theRepeatConfig companion object
case class RepeatConfig[E, T](schedule: Schedule, shouldContinueOnResult: T => Boolean)

A config that defines how to repeat an operation.

Schedule provides the interval between subsequent invocations, which guarantees that the next operation will start no sooner than the specified duration after the previous operations has finished. If the previous operation takes longer than the interval, the next operation will start immediately after the previous one has finished.

It is a special case of ScheduledConfig with ScheduledConfig.sleepMode always set to SleepMode.Interval and a ScheduledConfig.afterAttempt callback which checks if the result was successful.

Type parameters

E

The error type of the operation. For operations returning a T or a Try[T], this is fixed to Throwable. For operations returning an Either[E, T], this can be any E.

T

The successful result type for the operation.

Value parameters

schedule

The repeat schedule which determines the maximum number of invocations and the interval between subsequent invocations. See Schedule for more details.

shouldContinueOnResult

A function that determines whether to continue the loop after a success. The function receives the value that was emitted by the last invocation. Defaults to => true.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product