Registry /
devops / supervisord-dependent-startup
Install & Compatibility
Where this runs
tested against v1.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.3MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.9s · import 0.000s · 22MB
20MB installed
● package 20MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
listener
✓ from supervisord_dependent_startup import listener
While this module can be imported, this library is primarily used as a Supervisord event listener and is executed by Supervisord via `python -m supervisord_dependent_startup.listener`, not typically imported directly into user Python code for application logic.
This quickstart illustrates the programmatic reference to the `supervisord_dependent_startup.listener` module. However, the primary use case for this library is via configuration in `supervisord.conf`, where Supervisord executes the listener as an event handler. The Python code below shows the import path and explains how the plugin is actually used within Supervisord's ecosystem, rather than directly by a user's Python application.
import os
# This Python quickstart demonstrates how the core listener module
# of 'supervisord-dependent-startup' can be referenced.
# IMPORTANT: This library is a Supervisord plugin and is NOT typically
# used by importing it directly into your application's Python code.
# It is executed by Supervisord itself.
try:
from supervisord_dependent_startup import listener
print(f"Successfully imported the Supervisord listener module: {listener.__name__}")
print(f"Path: {listener.__file__}")
print("\nThis module is designed to be run as an eventlistener via supervisord.conf:")
print("\n [eventlistener:dependent-startup]")
print(" command=python -m supervisord_dependent_startup.listener")
print(" events=PROCESS_STATE")
print("\nTo truly 'start' this plugin, you must configure Supervisord and launch Supervisord itself.")
except ImportError as e:
print(f"Error importing supervisord_dependent_startup.listener: {e}")
print("Please ensure 'pip install supervisord-dependent-startup' is complete.")
# A more practical quickstart would involve a supervisord.conf file, e.g.:
#
# [program:db_service]
# command=python /path/to/db_mock.py
# priority=100
#
# [program:my_app]
# command=python /path/to/my_app.py
# priority=200
# dependencies=db_service # <-- This is where the magic happens!
#
# For full setup, refer to the project's GitHub README.
Debug
Known issues
gotchaThis plugin requires Supervisor version 4.0.0 or higher. Using it with older Supervisor versions may lead to unexpected behavior or failure to load the event listener.fixEnsure your Supervisor installation is version 4.0.0 or newer. Upgrade Supervisor if necessary.
affects: <1.4.0 (for older Supervisord versions), all (for Supervisor < 4.0.0)
gotchaThe `dependencies` option relies on dependent processes reaching the `RUNNING` state. Processes stuck in `STARTING`, `BACKOFF`, or `STOPPED` states will prevent dependent programs from starting.fixThoroughly test your dependent services to ensure they reliably transition to the `RUNNING` state. Check your program logs for errors preventing full startup.
affects: all
gotchaWhen configuring `dependencies_stop_signal` on a program, it overrides Supervisord's `stopwaitsecs` for that specific program during the stop sequence. If not set, `stopwaitsecs` applies.fixCarefully consider if you need a specific stop signal for dependent services. If so, configure `dependencies_stop_signal` with the desired signal (e.g., `TERM`, `QUIT`). Otherwise, rely on Supervisor's `stopwaitsecs` and `stopsignal`.
affects: all
breakingIf migrating from the predecessor `ordered-startup-supervisord`, note that the configuration option for dependencies has changed from `ordered_startup_dependencies` to simply `dependencies`.fixUpdate your `supervisord.conf` files to use `dependencies=service1,service2` instead of `ordered_startup_dependencies=service1,service2`.
affects: Users migrating from `ordered-startup-supervisord` to `supervisord-dependent-startup`
Errors
Common errors & fixes
ERROR (no such file) trying to run command python -m supervisord_dependent_startup.listener
The `command` path for the eventlistener in `supervisord.conf` is incorrect, or the Python environment where supervisord is running does not have `supervisord-dependent-startup` installed or accessible.
fixVerify that `pip install supervisord-dependent-startup` was run in the correct environment. Ensure `python -m supervisord_dependent_startup.listener` executes correctly from the command line in the Supervisord's context. Use an absolute path to the Python executable if necessary (e.g., `/usr/bin/python3 -m supervisord_dependent_startup.listener`).
Error: The program 'my_app' has a circular dependency.
Your `supervisord.conf` configuration defines a circular dependency chain between two or more programs (e.g., A depends on B, and B depends on A).
fixReview your `dependencies` settings for all programs and redesign your startup order to eliminate circular references. One program must eventually be able to start without waiting for another in the cycle.
Process 'my_app' did not start; dependencies 'db_service' did not reach RUNNING state.
One or more of the programs listed in the `dependencies` option for 'my_app' failed to transition to the `RUNNING` state, preventing 'my_app' from being started by the plugin.
fixInspect the logs and status of the dependent services (`db_service` in this example) using `supervisorctl status` and `supervisorctl tail db_service` to identify why they are not reaching the `RUNNING` state.
Upgrade
Version history
1.4.0latest on PyPI · released Oct 9, 2019
Audit
Dependencies
supervisorrequiredThis is a plugin for Supervisor and requires Supervisor version 4.0.0 or higher to function.
Resources
No resource links recorded.