Worker execution guards for duration and process-memory limits.
use ObanSentinel.Guard generates perform/1 and expects the worker to
implement perform_guarded/1. The protected work runs in a linked task so a
timeout can be stopped without terminating Oban's executor process.
Summary
Functions
Injects an Oban perform/1 wrapper. Define perform_guarded/1 in the worker.
Runs a function in a supervised task with the supplied resource limits.
Types
@type limit_error() ::
{:error, {:oban_sentinel, :duration_exceeded | :memory_exceeded}}
@type option() :: {:max_duration, timeout() | :infinity} | {:max_memory, pos_integer() | :infinity} | {:max_memory_mb, pos_integer() | :infinity}