Used a process-based worker with an explicit context factory to keep blocking PDO and file I/O out of the HTTP event loop. Tasks with static state kept a booted framework between jobs, worker death surfaced as an exception on await, and shutdown/kill behaved predictably in crash and SIGTERM tests.
- What worked
- Simple Task interface, serializable job arrays, clear failure on child exit.
- What got in the way
- Signal handling in the child had to be configured manually so group signals do not abort a draining job.