diff --git a/Makefile b/Makefile index a306b6405..f70dd4a3b 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,24 @@ NOTIFY_CREDENTIALS ?= ~/.notify-credentials ## DEVELOPMENT +.PHONY: run-flask +run-flask: + . environment.sh && flask run -p 6011 + +.PHONY: run-celery +run-celery: + . environment.sh && celery \ + -A run_celery.notify_celery worker \ + --pidfile="/tmp/celery.pid" \ + --loglevel=INFO \ + --concurrency=4 + +.PHONY: run-celery-beat +run-celery-beat: + . environment.sh && celery \ + -A run_celery.notify_celery beat \ + --loglevel=INFO + .PHONY: help help: @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/README.md b/README.md index db6b1e5ce..ff3b1cc86 100644 --- a/README.md +++ b/README.md @@ -71,20 +71,19 @@ You need to run the api application and a local celery instance. There are two run scripts for running all the necessary parts. ``` -scripts/run_app.sh +make run-flask ``` ``` -scripts/run_celery.sh +make run-celery ``` Optionally you can also run this script to run the scheduled tasks: ``` -scripts/run_celery_beat.sh +make run-celery-beat ``` - ## To test the application First, ensure that `scripts/bootstrap.sh` has been run, as it creates the test database. diff --git a/scripts/run_app.sh b/scripts/run_app.sh deleted file mode 100755 index 9997d1072..000000000 --- a/scripts/run_app.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e - -source environment.sh -flask run -p 6011 diff --git a/scripts/run_celery.sh b/scripts/run_celery.sh deleted file mode 100755 index 8830d2491..000000000 --- a/scripts/run_celery.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e - -source environment.sh -celery -A run_celery.notify_celery worker --pidfile="/tmp/celery.pid" --loglevel=INFO --concurrency=4 diff --git a/scripts/run_celery_beat.sh b/scripts/run_celery_beat.sh deleted file mode 100755 index 1d5278e0d..000000000 --- a/scripts/run_celery_beat.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e - -source environment.sh -celery -A run_celery.notify_celery beat --loglevel=INFO