Helper functions for dealing with Steward managed jobs.
Summary
Functions
@spec all_resource_jobs(Oban.name(), Steward.Resource.t() | [Steward.Resource.t()]) :: [Oban.Job.t()]
Fetches all jobs for a given resource.
@spec delete_resource_jobs(Oban.name(), Steward.Resource.t() | [Steward.Resource.t()]) :: {:ok, non_neg_integer()}
Deletes all jobs for a given resource.
If you wish to halt reconciliation for the resource, see Steward.Controller.cancel_resource!/2
instead, and wait for the next reconciliation to delete pending resource jobs automatically.
Steward then deletes the remaining jobs of cancelled resources after some time, see the
:prune_max_age option of Steward.Plugin.