nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.

Home Page:http://pypi.python.org/pypi/honcho

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exclude the 'release' process from `honcho start`

edmorley opened this issue · comments

Heroku's release-phase feature uses a release process type in the Procfile to denote what short-lived tasks should run after deploy (eg DB migrations).

Unfortunately this gives two problems when using honcho start:

  1. The release process is started, when really it's not desirable for the contents to run (in a development environment I don't want to automatically perform DB migrations or report deployments to the New Relic dashboard).
  2. All other processes are terminated once the release process exits, when it's expected that the script will only be short-lived.

Current workarounds are:

  • Specify each process type manually, excluding 'release', eg honcho start web foo bar baz .... However this is a pain to type each time (or to try and keep bash aliases in sync etc).
  • Modify the release process type to try and detect if it's running in development, and make it skip the release tasks and instead permanently loop doing nothing.

#184 would allow for excluding the release process via the command line (which would at least save having to list all other process types), and then #157 would save having to even type that by using a config file.

However I wonder if it would be helpful to just exclude it by default? (The only risk is name collision with non-Heroku users using a process name of release.)

Hi! Would a PR for this be accepted?

I personally got around this by using a Procfile.dev that does a few things for me:

  • Use django's web server instead of gunicorn
  • Don't specify the release process type, as well as a couple other production-only process types

Then I threw this into my Makefile and start the app with make start:

start:
	honcho start -f Procfile.dev

I don't think we want Honcho to start treating certain process types as special. As far as I can tell foreman doesn't do this either.