mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
refactor(gateway): run inbox and BYO polling from FastAPI lifespan
This commit is contained in:
parent
72024353f9
commit
08bf3cc023
9 changed files with 415 additions and 81 deletions
|
|
@ -140,11 +140,11 @@ start_worker() {
|
|||
if [ -n "${CELERY_QUEUES}" ]; then
|
||||
QUEUE_ARGS="--queues=${CELERY_QUEUES}"
|
||||
else
|
||||
# When no queues specified, consume from BOTH the default queue and
|
||||
# the connectors queue. Without --queues, Celery only consumes from
|
||||
# the default queue, leaving connector indexing tasks stuck.
|
||||
# When no queues specified, consume from the default, connectors, and
|
||||
# gateway maintenance queues. Without --queues, Celery only consumes
|
||||
# from the default queue, leaving connector/gateway maintenance tasks stuck.
|
||||
DEFAULT_Q="${CELERY_TASK_DEFAULT_QUEUE:-surfsense}"
|
||||
QUEUE_ARGS="--queues=${DEFAULT_Q},${DEFAULT_Q}.connectors"
|
||||
QUEUE_ARGS="--queues=${DEFAULT_Q},${DEFAULT_Q}.connectors,${DEFAULT_Q}.gateway"
|
||||
fi
|
||||
|
||||
echo "Starting Celery Worker (autoscale=${CELERY_MAX_WORKERS},${CELERY_MIN_WORKERS}, max-tasks-per-child=${CELERY_MAX_TASKS_PER_CHILD}, queues=${CELERY_QUEUES:-all})..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue