Skip to content

Commit

Permalink
celery settings
Browse files Browse the repository at this point in the history
  • Loading branch information
leftmove authored Jun 27, 2024
1 parent 880884d commit 59b90d5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/routers/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@

production_environment = True if ENVIRONMENT == "production" else False
run_telemetry = True if TELEMETRY else False
config = {"worker_concurrency": WORKERS, "broker_connection_retry_on_startup": True}

class Config:
worker_concurrency = WORKERS
conccurrency = 4
broker_connection_retry_on_startup = True

queue = Celery("worker", broker=BROKER)
queue.config_from_object(config)
queue.config_from_object(Config)


@signals.celeryd_init.connect
Expand Down

0 comments on commit 59b90d5

Please sign in to comment.