Add a beat processing schedule for environment provisioning jobs.
The beat schedule is set to once per minute for each of the three environment provisioning tasks. Adding a beat schedule surfaced two problems that are addressed here with the following changes: - Commit the SQLALchemy session in order to release the environment lock. Otherwise the change to the `claimed_until` field is not persisted. - Set `none_as_null` on the JSOB fields on the `Environment`. This avoids problems with querying on Postgres JSON fields that are empty. This also adds a small change to the development command for the Celery worker. Multiple child processes were executing the beat jobs, which lead to exceptions for environment locks and confusing log output. This contrains the dev command to a single Celery worker.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
WORKER="pipenv run celery -A celery_worker.celery worker --loglevel=info -B"
|
||||
WORKER="pipenv run celery -A celery_worker.celery worker --loglevel=info -B -c 1"
|
||||
|
||||
if [[ `command -v entr` ]]; then
|
||||
find atst | entr -r $WORKER
|
||||
|
Reference in New Issue
Block a user