supervisorctl: add a "once" command

Created on 20 Jul 2016  路  1Comment  路  Source: Supervisor/supervisor

The proposed command would have the following semantics:

Acts on one or more processes (same semantics as "stop"), and runs the process once (regardless of the configuration). If the process is already running, wait until it exits (normally or not), but do not restart it.

The purpose is mostly for debugging and troubleshooting, in particular for a cycling process that dies shortly after start. In those cases, using "stop" is not suitable, as it interferes with the process (sends configured stop signal).

supervisorctl

Most helpful comment

The purpose is mostly for debugging and troubleshooting

I think it is reasonable to ask a user to set autorestart = false when debugging. That will cause supervisord to run the command once (if the command exists, supervisord will not restart it, but the start command will run it again).

If that is not sufficient for your use case, the extra command proposed here can be entirely implemented as a plugin (it would be an rpcinterface and a ctlplugin). Given the limited scope and overlap with autorestart, I would rather see it as a plugin first rather than part of the core Supervisor package.

>All comments

The purpose is mostly for debugging and troubleshooting

I think it is reasonable to ask a user to set autorestart = false when debugging. That will cause supervisord to run the command once (if the command exists, supervisord will not restart it, but the start command will run it again).

If that is not sufficient for your use case, the extra command proposed here can be entirely implemented as a plugin (it would be an rpcinterface and a ctlplugin). Given the limited scope and overlap with autorestart, I would rather see it as a plugin first rather than part of the core Supervisor package.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mminer picture mminer  路  41Comments

ramary picture ramary  路  33Comments

grandfatha picture grandfatha  路  57Comments

srwilson picture srwilson  路  25Comments

ojii picture ojii  路  20Comments