Merge ~ilasc/turnip:prefork-pool-repack-worker into turnip:master

Proposed by Ioana Lasc
Status: Merged
Approved by: Ioana Lasc
Approved revision: d4daf664a44b9485629ad5d2ca43e75deaa8b484
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ilasc/turnip:prefork-pool-repack-worker
Merge into: turnip:master
Diff against target: 40 lines (+5/-5)
2 files modified
Makefile (+4/-4)
charm/turnip-celery/templates/turnip-celery-repack.service.j2 (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+403615@code.launchpad.net

Commit message

Use prefork pool for repack worker

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 68b80d2..2d43994 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -121,9 +121,9 @@ run-repack-worker: $(ENV)
6 $(CELERY) -A turnip.tasks worker -n repack-worker \
7 --loglevel=debug \
8 --concurrency=1 \
9- --pool=gevent \
10 --prefetch-multiplier=1 \
11- --queue=repacks
12+ --queue=repacks \
13+ -O=fair
14
15 run:
16 make run-api &\
17@@ -137,8 +137,8 @@ stop:
18 -pkill -f 'make run-pack'
19 -pkill -f 'make run-worker'
20 -pkill -f 'make run-repack-worker'
21- -pkill -f '$(CELERY) -A tasks worker'
22- -pkill -f '$(CELERY) -A tasks repack-worker'
23+ -pkill -f '$(CELERY) -A turnip.tasks worker default-worker'
24+ -pkill -f '$(CELERY) -A turnip.tasks worker repack-worker'
25
26 $(PIP_CACHE): $(ENV)
27 mkdir -p $(PIP_CACHE)
28diff --git a/charm/turnip-celery/templates/turnip-celery-repack.service.j2 b/charm/turnip-celery/templates/turnip-celery-repack.service.j2
29index cf1f3d6..631fc3f 100644
30--- a/charm/turnip-celery/templates/turnip-celery-repack.service.j2
31+++ b/charm/turnip-celery/templates/turnip-celery-repack.service.j2
32@@ -16,7 +16,7 @@ Environment=TURNIP_LOG_DIR={{ logs_dir }}
33 Environment=CELERY_BROKER={{ celery_broker }}
34 Environment=VIRTINFO_ENDPOINT={{ virtinfo_endpoint }}
35 Environment=VIRTINFO_TIMEOUT={{ virtinfo_timeout }}
36-ExecStart={{ venv_dir }}/bin/celery -A turnip.tasks worker -n repack-worker --logfile={{ logs_dir }}/turnip-celery-repacks.log --loglevel=DEBUG --pool=gevent --prefetch-multiplier=1 --queue=repacks --concurrency=1
37+ExecStart={{ venv_dir }}/bin/celery -A turnip.tasks worker -n repack-worker --logfile={{ logs_dir }}/turnip-celery-repacks.log --loglevel=DEBUG --prefetch-multiplier=1 --queue=repacks --concurrency=1 -O=fair
38 ExecReload=/bin/kill -s HUP $MAINPID
39 ExecStop=/bin/kill -s TERM $MAINPID
40 LimitNOFILE=1048576

Subscribers

People subscribed via source and target branches