Skip to content

queue-prefork 1.2.0

Latest

Choose a tag to compare

@tevkert tevkert released this 20 Nov 16:17

Apps that run Horizon's supervisors inside the master can now fork their workers too.

  • Supervisors inside the master: some apps run their Horizon supervisors in the master process instead of one process each, which saves a process, and its Redis connections, per supervisor. Until now such an app had to run stock. With QUEUE_PREFORK_HORIZON_INLINE=true, a call to Master::start() in the app's own horizon command and the ForksWorkersFromTemplate trait on its process pool, the template forks those supervisors' workers directly. Every failure falls back to stock workers, as elsewhere. See "Supervisors inside the master" in the README. Apps that don't opt in run exactly as before. Contributed by Volodymyr Shandak (#7).
  • Paused workers after a restart: a Horizon worker paused before its first loop, then continued, came back paused after its next restart (for example after maxJobs or maxTime) and took no jobs until the next pause and continue. It now restarts in the latest state.

Upgrade: composer update tevkert/queue-prefork, then php artisan horizon:terminate (and queue:restart for plain workers) as after any deploy.

Full changelog: v1.1.2...v1.2.0