From 11676a1f71c2d043cf7f528325ae8298e7e26125 Mon Sep 17 00:00:00 2001 From: Bryan Date: Thu, 26 Feb 2015 23:29:23 -0500 Subject: [PATCH] Reconfiguring Procfile closes #415, also closes #413 --- .foreman | 2 +- Procfile | 2 +- Procfile-development | 1 - README.md | 3 +++ celerywrapper.sh | 11 ----------- 5 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 Procfile-development delete mode 100755 celerywrapper.sh diff --git a/.foreman b/.foreman index 267e5da..e78de76 100644 --- a/.foreman +++ b/.foreman @@ -1,2 +1,2 @@ port: 8000 -procfile: Procfile-development +procfile: Procfile diff --git a/Procfile b/Procfile index cb3c4d8..c596ce1 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: newrelic-admin run-program gunicorn -b 0.0.0.0:$PORT karmaworld.wsgi -celerywrapper: sh celerywrapper.sh +worker: python manage.py celery worker -B -l info -Q $CELERY_QUEUE_NAME diff --git a/Procfile-development b/Procfile-development deleted file mode 100644 index 13deb3a..0000000 --- a/Procfile-development +++ /dev/null @@ -1 +0,0 @@ -web: python manage.py runserver "0.0.0.0:$PORT" --settings "$DJANGO_SETTINGS_MODULE" diff --git a/README.md b/README.md index 529976b..0438bef 100644 --- a/README.md +++ b/README.md @@ -329,6 +329,9 @@ Run `foreman start`. `foreman` will load the `.env` file and manage running all processes in a way that is similar to that of Heroku. This allows better consistency with local, staging, and production deployments. +To run web-only, but no celery or beat, run `foreman start web` to specify +strictly the web worker. + Press ctrl-C to kill foreman. Foreman will run Django's runserver command. If you wish to have more control over how this is done, you can do `foreman run python manage.py runserver `. For running any other diff --git a/celerywrapper.sh b/celerywrapper.sh deleted file mode 100755 index d721f2d..0000000 --- a/celerywrapper.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -python manage.py celery worker --pidfile=/tmp/celeryd.pid -l info -Q $CELERY_QUEUE_NAME & -sleep 5 -workerpid=`cat /tmp/celeryd.pid` -echo "Started celery worker with pid $workerpid" -python manage.py celery beat --pidfile=/tmp/celerybeat.pid -l info & -sleep 5 -beatpid=`cat /tmp/celerybeat.pid` -echo "Started celery beat with pid $beatpid" -wait $workerpid -wait $beatpid -- 2.25.1