Skip to content

Commit

Permalink
Merge the notifications and cleaning workers
Browse files Browse the repository at this point in the history
The notifications queue is used very rarely (and not at all in the OSS
version), so it doesn't make sense to keep a dedicated worker just for it.
Combining the two workers in the utils container saves memory and startup
time.
  • Loading branch information
SpecLad committed Nov 8, 2024
1 parent a6fd1e5 commit 6bbdab6
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions supervisord/utils.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,10 @@ environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler"
numprocs=1
autorestart=true

[program:rqworker-notifications]
[program:rqworker]
command=%(ENV_HOME)s/wait_for_deps.sh
python3 %(ENV_HOME)s/manage.py rqworker -v 3 notifications
python3 %(ENV_HOME)s/manage.py rqworker -v 3 notifications cleaning
--worker-class cvat.rqworker.DefaultWorker
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler",CVAT_POSTGRES_APPLICATION_NAME="cvat:worker:notifications"
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler",CVAT_POSTGRES_APPLICATION_NAME="cvat:worker:notifications+cleaning"
numprocs=%(ENV_NUMPROCS)s
autorestart=true

[program:rqworker-cleaning]
command=%(ENV_HOME)s/wait_for_deps.sh
python3 %(ENV_HOME)s/manage.py rqworker -v 3 cleaning
--worker-class cvat.rqworker.DefaultWorker
environment=VECTOR_EVENT_HANDLER="SynchronousLogstashHandler",CVAT_POSTGRES_APPLICATION_NAME="cvat:worker:cleaning"
numprocs=%(ENV_NUMPROCS)s
process_name=%(program_name)s-%(process_num)d
autorestart=true

0 comments on commit 6bbdab6

Please sign in to comment.