diff --git a/Procfile b/Procfile index 0101271f..ba8ec7cf 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ assets: yarn watch web: PORT=8000 python app.py -queue: flask rq worker +queue: ./script/dev_queue diff --git a/README.md b/README.md index f9cf66fd..e5adfcfc 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,10 @@ locally: running on the default port of 6379. You can ensure that Redis is running by executing `redis-cli` with no options and ensuring a connection is succesfully made. +* [`entr`](http://www.entrproject.org/) + This dependency is optional. If present, the queue worker process will hot + reload in development. + ### Cloning This project contains git submodules. Here is an example clone command that will automatically initialize and update those modules: diff --git a/script/dev_queue b/script/dev_queue new file mode 100755 index 00000000..db171e3e --- /dev/null +++ b/script/dev_queue @@ -0,0 +1,11 @@ +#!/bin/bash + +# script/dev_queue: Run the queue with entr if available + +set -e + +if [[ `command -v entr` ]]; then + find atst | entr -r flask rq worker +else + flask rq worker +fi