nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.6k stars 146 forks source link

Stop honcho from Makefile #214

Closed alper closed 3 years ago

alper commented 5 years ago

We have a rather hacky Makefile where I'm looking to replace a bunch of stuff with honcho start but I'm not finding an equivalent stop command.

The thing is we have some functional tests for which the python stuff needs to run and when those tests have been done it needs to be stopped again. Any way to address this using honcho?

The current approach stores a PID and then kills that I believe.

nickstenning commented 4 years ago

Perhaps I'm misunderstanding the question, but honcho start runs a foreground process, so the idea of a honcho stop command doesn't make a great deal of sense to me.

alper commented 4 years ago

Yeah, I get that but say we use the honcho command in our testing sequence to start everything before doing functional tests, we would like to tear everything down again.

I get that we could start things manually maybe but honcho is a compact and DRY way to start everything that needs to be started.

jacebrowning commented 3 years ago

@alper One option is to run your tests with honco as well:

# Procfile.e2e

app: python manage.py runserver
test: pytest e2e_tests

via honcho --procfile Procfile.e2e. I have an example of this pattern here.

alper commented 3 years ago

Ah, thanks. That's quite clever!

nickstenning commented 3 years ago

Closing this as I don't believe there are any changes in Honcho needed here.