Durable.Pruner (Durable v2.0.2)
View SourceDeletes finished runs older than the :prune config, once an hour. Steps,
pending inputs, events and wait groups go with their run (foreign keys
cascade); child runs keep living and are pruned on their own age.
Deletes go in batches of 5000 with FOR UPDATE SKIP LOCKED, so every
node can run the pruner without stepping on the others or holding long
locks. Running and waiting runs are never pruned.
Each batch emits [:durable, :pruner, :pruned] with %{count} and the
:group (:completed, :failed or :cancelled).
Summary
Functions
Returns a specification to start this module under a supervisor.
Prunes now. Returns how many runs were deleted per group.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec prune(Durable.Config.t()) :: %{required(atom()) => non_neg_integer()}
Prunes now. Returns how many runs were deleted per group.