WardrikTriggers.Run (wardrik_triggers v0.1.0-rc.1)

Copy Markdown

Runs one due trigger or one webhook request. Reads feeds, asks the agent, and reports the status to the target and to telemetry.

Summary

Functions

Runs trigger, which was due at due, at now.

Asks the agent about a webhook request. See WardrikTriggers.deliver/4.

Functions

clock(settings, agent_id, trigger, due, now)

Runs trigger, which was due at due, at now.

A run more than a minute late with missed: :skip returns :missed and asks nothing.

webhook(settings, agent_id, name, request)

@spec webhook(map(), String.t(), String.t(), WardrikTriggers.Webhook.request()) ::
  :ok | {:error, :not_found | :busy | :no_agent | :failed}

Asks the agent about a webhook request. See WardrikTriggers.deliver/4.