Reconfiguring Procfile closes #415, also closes #413
authorBryan <btbonval@gmail.com>
Fri, 27 Feb 2015 04:29:23 +0000 (23:29 -0500)
committerBryan <btbonval@gmail.com>
Fri, 27 Feb 2015 04:29:23 +0000 (23:29 -0500)
.foreman
Procfile
Procfile-development [deleted file]
README.md
celerywrapper.sh [deleted file]

index 267e5daa3ae6bc1748d55229cdccf0b0f36b54a5..e78de7675bc1e00c9721ac9bbb3cbb92e09d843e 100644 (file)
--- a/.foreman
+++ b/.foreman
@@ -1,2 +1,2 @@
 port: 8000
-procfile: Procfile-development
+procfile: Procfile
index cb3c4d88c67575fb2b9a1bb6825229b26dbdeb7d..c596ce18219156b29d3bca2cc390c8045f09ef28 100644 (file)
--- 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 (file)
index 13deb3a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-web: python manage.py runserver "0.0.0.0:$PORT" --settings "$DJANGO_SETTINGS_MODULE"
index 529976ba1e1d71e39182d8c2102559e0ed6a06db..0438befe27f3f96b21b7045df8f3a10c0e07c174 100644 (file)
--- 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 <options>`. For running any other
diff --git a/celerywrapper.sh b/celerywrapper.sh
deleted file mode 100755 (executable)
index d721f2d..0000000
+++ /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