Skip to content

3.1.0

Latest

Choose a tag to compare

@pierotto pierotto released this 03 Sep 12:20
e00b886

What's Changed

  • Add optional process group for generated programs by @pierotto in #7

Process groups

New optional group option. When set, the generated configuration gains a [group:<name>] section
listing every program:

supervisor:
    group: 'myapp'
    programs:
        worker:
            command: 'php %kernel.project_dir%/bin/console app:worker'
[group:myapp]
programs = worker

The processes are then addressed as myapp:worker, so a project sharing a supervisord with other
projects can restart only its own during a deploy:

supervisorctl stop myapp:*
# ... deploy ...
supervisorctl reread
supervisorctl update myapp
supervisorctl start myapp:*

This replaces the machine-wide supervisorctl stop all / supervisorctl reload. Note that reload
restarts the supervisord daemon itself and therefore every project on the machine.

Upgrading

No changes required. group defaults to an empty string, so a configuration that does not set it
generates byte-for-byte the same output as 3.0.0, and $group is the last constructor argument of
SupervisorConfigGenerator with a default.

Two things to know before adopting the option:

  • Targeting supervisorctl update at a group name requires supervisor 3.2 or newer.
  • Adding group to a project already running under supervisor renames its processes, and a
    group-scoped update will not remove the old ungrouped ones. The README documents the one-off
    migration.

Full Changelog: 3.0.0...3.1.0