I'm running Celery Flower in Docker (see this question for details). The command ends up being:
celery -A proj flower --persistent=True --db=/flower/flower
I've got a persistent volume all set up on /flower
. However, it looks like Flower never writes anything to its database file, even after 30 minutes of uptime (during which ~120 tasks were processed):
-rw-r--r-- 1 user user 0 Mar 11 00:08 flower.bak
-rw-r--r-- 1 user user 0 Mar 10 23:29 flower.dat
-rw-r--r-- 1 user user 0 Mar 11 00:08 flower.dir
Stopping the Docker container gracefully doesn't work, and so Docker forcefully kills it, which means nothing ends up being written to the database and so it's as if nothing was persisted.
Is there a way to get Flower to either flush its database occasionally, or, better yet, to exit gracefully?