allow queue worker process to hot reload if entr is available
This commit is contained in:
parent
6a2a7545ae
commit
f13cc03d24
2
Procfile
2
Procfile
@ -1,3 +1,3 @@
|
|||||||
assets: yarn watch
|
assets: yarn watch
|
||||||
web: PORT=8000 python app.py
|
web: PORT=8000 python app.py
|
||||||
queue: flask rq worker
|
queue: ./script/dev_queue
|
||||||
|
@ -39,6 +39,10 @@ locally:
|
|||||||
running on the default port of 6379. You can ensure that Redis is running by
|
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.
|
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
|
### Cloning
|
||||||
This project contains git submodules. Here is an example clone command that will
|
This project contains git submodules. Here is an example clone command that will
|
||||||
automatically initialize and update those modules:
|
automatically initialize and update those modules:
|
||||||
|
11
script/dev_queue
Executable file
11
script/dev_queue
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user