Closed wkentaro closed 2 years ago
Hi there! Thanks for contributing to Honcho. For a change like this we'd need to add some tests and update the documentation. I also want to make sure I understand the motivation here. What's the situation in which you want Honcho to always respawn your processes?
Hi. Ok, I will add/update the tests and documentation.
Current my usecase of Honcho is for uploading a network camera frames to a server, and sometimes the program can die because of the unstable network connection.
I use Honcho so that I can start the recording (uploading) multiple cameras' frame by a single command.
Of course, it is possible for me to use honcho export
(or foreman export
) (as stated https://github.com/ddollar/foreman/issues/312#issuecomment-41111311),
but it is a bit complicated when I just want to use it at development stage (not application still).
Although the program is still the development stage, I need make the program run for days or a week.
@nickstenning I added an integration test for this feature, could you please review again?
I'm going to go ahead and close this. I don't see the need to add this functionality to Honcho itself. If you have a Procfile which currently contains
main: myprogram
and myprogram
is flaky, you can always wrap the execution in a loop:
main: sh -c 'while [ 1 ]; do myprogram; done'
This even has the advantage that you can select whether to respawn each process type individually.
Why?
In order to respawn terminated process without exporting upstart, for unexpected error in running programs. Ctrl-c still works with this change.
Usage