← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pappacena/turnip:charm-celery-virtinfo-config into turnip:master

 

Thiago F. Pappacena has proposed merging ~pappacena/turnip:charm-celery-virtinfo-config into turnip:master.

Commit message:
Adding virtinfo endpoint config on celery charm

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/391554
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/turnip:charm-celery-virtinfo-config into turnip:master.
diff --git a/charm/turnip-celery/config.yaml b/charm/turnip-celery/config.yaml
index 9cf765d..6f8ffb1 100644
--- a/charm/turnip-celery/config.yaml
+++ b/charm/turnip-celery/config.yaml
@@ -3,3 +3,11 @@ options:
     type: string
     default: pyamqp://guest@localhost//
     description: Celery broker URL
+  virtinfo_endpoint:
+    type: string
+    default: http://localhost:6543/githosting
+    description: Virtinfo endpoint (Launchpad/Turnipcake)
+  virtinfo_timeout:
+    type: int
+    default: 15
+    description: Timeout for virtinfo requests, in seconds.
diff --git a/charm/turnip-celery/templates/turnip-celery.service.j2 b/charm/turnip-celery/templates/turnip-celery.service.j2
index 6370157..e6a2132 100644
--- a/charm/turnip-celery/templates/turnip-celery.service.j2
+++ b/charm/turnip-celery/templates/turnip-celery.service.j2
@@ -14,6 +14,8 @@ Environment=PATH={{ venv_dir }}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/us
 Environment=REPO_STORE={{ data_dir }}/repos
 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 --logfile={{ logs_dir }}/turnip-celery.log --pool=gevent
 ExecReload=/bin/kill -s HUP $MAINPID
 ExecStop=/bin/kill -s TERM $MAINPID