Browse Source

Reconfiguring Procfile closes #415, also closes #413

Bryan 9 years ago
parent
commit
11676a1f71
5 changed files with 5 additions and 14 deletions
  1. 1 1
      .foreman
  2. 1 1
      Procfile
  3. 0 1
      Procfile-development
  4. 3 0
      README.md
  5. 0 11
      celerywrapper.sh

+ 1 - 1
.foreman

@@ -1,2 +1,2 @@
 port: 8000
-procfile: Procfile-development
+procfile: Procfile

+ 1 - 1
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

+ 0 - 1
Procfile-development

@@ -1 +0,0 @@
-web: python manage.py runserver "0.0.0.0:$PORT" --settings "$DJANGO_SETTINGS_MODULE"

+ 3 - 0
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 <options>`. For running any other

+ 0 - 11
celerywrapper.sh

@@ -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