Current section

Files

Jump to
gust lib gust dag run_restarter.ex
Raw

lib/gust/dag/run_restarter.ex

# TODO: Rename module and funcitons
defmodule Gust.DAG.RunRestarter do
@moduledoc false
@callback start_dag(term()) :: term()
@callback restart_run(term()) :: :ok
@callback restart_task(term(), term()) :: :ok
@callback restart([term()]) :: :ok
@callback restart_enqueued(term()) :: :ok
def start_dag(dag_id), do: impl().start_dag(dag_id)
def restart_run(run), do: impl().restart_run(run)
def restart_task(graph, task), do: impl().restart_task(graph, task)
def restart(dags), do: impl().restart(dags)
def restart_enqueued(dag), do: impl().restart_enqueued(dag)
defp impl, do: Application.get_env(:gust, :dag_run_restarter)
end