Closed gjost closed 6 years ago
tmp/*.status
cache files are generated by the celerybeat task.
tmp/gitstatus-queue
tracks which collections to check next.
There are two Celery tasks that run on a single-seat ddr-local:
celery
: Handles saving documents in the background, syncing, etc.celerybeat
: Like a cron for Celery tasks; checks every minute and does things.Celerybeat is a separate task managed by Supervisor that runs this command:
/usr/local/src/ddr-local/ddrlocal/manage.py celery beat -S
Celerybeat runs ddrlocal.webui.gitstatus.update_store
, which does the actual update.
There is a bunch of celery config in settings.py
that instructs the celerybeat app to hit that particular gitstatus function.
On a single-seat ddr-local, celerybeat is set up when you run make enable-bkgnd
.
In the HQ it's best if there is only one celerybeat running, though the gitstatus code I wrote does do some locking.
On dragontail
in the HQ, looks like .../gold/tmp/gitstatus-queue
is old. There are *.status
present in that dir which are newer. This suggests that whichever machine is actually running celerybeat is writing gitstatus-queue
somewhere else.
settings.GITSTATUS_QUEUE_PATH
governs where the queue is written.
This is MEDIA_URL
+ .gitstatus-queue
.
On my dev this is /var/www/media/ddr/.gitstatus-queue
.
gfroh: