[eventlistener:x] Section Settings

Supervisor allows specialized homogeneous process groups (“eventlistener pools”) to be defined within the configuration file. Thesepools contain processes that are meant to receive and respond to eventnotifications from supervisor’s event system. See Events foran explanation of how events work and how to implement programs thatcan be declared as event listeners.

Note that all the options available to [program:x] sections arerespected by eventlistener sections except for stdoutcapture_maxbytes.Eventlisteners cannot emit process communication events on stdout,but can emit on stderr (see [_Capture Mode]($cbfdc5c0d0503fba.md#capture-mode)).

[eventlistener:x] Section Values

[eventlistener:x] sections have a few keys which [program:x]sections do not have.

buffer_size

The event listener pool’s event queue buffer size. When a listenerpool’s event buffer is overflowed (as can happen when an eventlistener pool cannot keep up with all of the events sent to it), theoldest event in the buffer is discarded.

events

A comma-separated list of event type names that this listener is“interested” in receiving notifications for (seeEvent Types for a list of valid event type names).

result_handler

A pkg_resources entry point string thatresolves to a Python callable. The default value issupervisor.dispatchers:default_handler. Specifying an alternateresult handler is a very uncommon thing to need to do, and as aresult, how to create one is not documented.

Consult [program:x] Section Settings for other allowable keys, delta theabove constraints and additions.

[eventlistener:x] Section Example

  1. [eventlistener:theeventlistenername]
  2. command=/bin/eventlistener
  3. process_name=%(program_name)s_%(process_num)02d
  4. numprocs=5
  5. events=PROCESS_STATE
  6. buffer_size=10
  7. directory=/tmp
  8. umask=022
  9. priority=-1
  10. autostart=true
  11. autorestart=unexpected
  12. startsecs=1
  13. startretries=3
  14. exitcodes=0
  15. stopsignal=QUIT
  16. stopwaitsecs=10
  17. stopasgroup=false
  18. killasgroup=false
  19. user=chrism
  20. redirect_stderr=false
  21. stdout_logfile=/a/path
  22. stdout_logfile_maxbytes=1MB
  23. stdout_logfile_backups=10
  24. stdout_events_enabled=false
  25. stderr_logfile=/a/path
  26. stderr_logfile_maxbytes=1MB
  27. stderr_logfile_backups=10
  28. stderr_events_enabled=false
  29. environment=A="1",B="2"
  30. serverurl=AUTO