From feeba1107304b8ad843eb1e97d265e51a9ca05d5 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 5 Nov 2015 16:00:29 +0000 Subject: [PATCH] Tell stg statscache to pull prod fedmsg data for testing. --- .../backend/templates/statscache.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/roles/statscache/backend/templates/statscache.py b/roles/statscache/backend/templates/statscache.py index b088d7ced0..6e64d8810e 100644 --- a/roles/statscache/backend/templates/statscache.py +++ b/roles/statscache/backend/templates/statscache.py @@ -3,6 +3,20 @@ import datetime config = { "statscache.datagrepper.profile": False, + {% if env == 'staging' %} + #"statscache.datagrepper.endpoint": "https://apps.stg.fedoraproject.org/datagrepper/raw", + + # Consume production fedmsg data in staging for now. + "statscache.datagrepper.endpoint": "https://apps.fedoraproject.org/datagrepper/raw", + "endpoints": { + "production-loopback": [ + "tcp://10.5.126.51:9940", + ], + }, + + {% else %} + "statscache.datagrepper.endpoint": "https://apps.fedoraproject.org/datagrepper/raw", + {% endif %} # Consumer stuff "statscache.consumer.enabled": True, @@ -10,7 +24,11 @@ config = { "statscache.sqlalchemy.uri": "postgres://statscache:{{statscache_db_password}}@db01/statscache", # stats models will go back at least this far (current value arbitrary) - "statscache.consumer.epoch": datetime.datetime(year=2015, month=8, day=8), + {% if env == 'staging' %} + "statscache.consumer.epoch": datetime.datetime(year=2015, month=10, day=1), + {% else %} + "statscache.consumer.epoch": datetime.datetime(year=2014, month=1, day=1), + {% endif %} # stats models are updated at this frequency "statscache.producer.frequency": datetime.timedelta(seconds=1),