Hephaestus.Steps.Wait (hephaestus v0.3.1)

Copy Markdown View Source

Built-in step that pauses a workflow for a specified duration.

Returns {:async} immediately. The runner is responsible for scheduling a resume after the configured delay using delay_ms/1.

Config

  • :duration - integer amount of time
  • :unit - one of :second, :minute, :hour, :day

Summary

Functions

Converts a duration config map into milliseconds.

Functions

delay_ms(map)

@spec delay_ms(%{duration: integer(), unit: :second | :minute | :hour | :day}) ::
  integer()

Converts a duration config map into milliseconds.

Used by runners to determine how long to wait before resuming the workflow.