Gust.DAG.Run.Trigger behaviour (gust v0.1.40)

Copy Markdown View Source

Behaviour for triggering DAG run actions (reset/requeue/dispatch).

This module delegates to the configured implementation module:

config :gust, :dag_run_trigger, Gust.DAG.Run.Trigger.Requeue

The configured module must implement this behaviour.

Summary

Types

graph()

@type graph() :: term()

run()

@type run() :: term()

task()

@type task() :: term()

Callbacks

dispatch_all_runs(term)

@callback dispatch_all_runs(term()) :: [term()]

dispatch_run(run)

@callback dispatch_run(run()) :: term()

reset_run(run)

@callback reset_run(run()) :: term()

reset_task(graph, arg2)

@callback reset_task(graph(), task() | [task()]) ::
  {:ok, task()} | {:ok, [task()]} | {:error, term()}

Functions

dispatch_all_runs(dag_id)

dispatch_run(run)

@spec dispatch_run(run()) :: term()

reset_run(run)

@spec reset_run(run()) :: term()

reset_task(graph, task)

@spec reset_task(graph(), task() | [task()]) ::
  {:ok, task()} | {:ok, [task()]} | {:error, term()}