← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Ioana Lasc has proposed merging ~ilasc/turnip:prefork-pool-repack-worker into turnip:master.

Commit message:
Use prefork pool for repack worker

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ilasc/turnip/+git/turnip/+merge/403615
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/turnip:prefork-pool-repack-worker into turnip:master.
diff --git a/Makefile b/Makefile
index 68b80d2..2d43994 100644
--- a/Makefile
+++ b/Makefile
@@ -121,9 +121,9 @@ run-repack-worker: $(ENV)
 	$(CELERY) -A turnip.tasks worker -n repack-worker \
 		--loglevel=debug \
 		--concurrency=1 \
-		--pool=gevent \
 		--prefetch-multiplier=1 \
-		--queue=repacks
+		--queue=repacks \
+		-O=fair
 
 run:
 	make run-api &\
@@ -137,8 +137,8 @@ stop:
 	-pkill -f 'make run-pack'
 	-pkill -f 'make run-worker'
 	-pkill -f 'make run-repack-worker'	
-	-pkill -f '$(CELERY) -A tasks worker'
-	-pkill -f '$(CELERY) -A tasks repack-worker'	
+	-pkill -f '$(CELERY) -A turnip.tasks worker default-worker'
+	-pkill -f '$(CELERY) -A turnip.tasks worker repack-worker'
 
 $(PIP_CACHE): $(ENV)
 	mkdir -p $(PIP_CACHE)
diff --git a/charm/turnip-celery/templates/turnip-celery-repack.service.j2 b/charm/turnip-celery/templates/turnip-celery-repack.service.j2
index cf1f3d6..631fc3f 100644
--- a/charm/turnip-celery/templates/turnip-celery-repack.service.j2
+++ b/charm/turnip-celery/templates/turnip-celery-repack.service.j2
@@ -16,7 +16,7 @@ Environment=TURNIP_LOG_DIR={{ logs_dir }}
 Environment=CELERY_BROKER={{ celery_broker }}
 Environment=VIRTINFO_ENDPOINT={{ virtinfo_endpoint }}
 Environment=VIRTINFO_TIMEOUT={{ virtinfo_timeout }}
-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
+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
 ExecReload=/bin/kill -s HUP $MAINPID
 ExecStop=/bin/kill -s TERM $MAINPID
 LimitNOFILE=1048576