Missed some print statements and unused imports.

This commit is contained in:
Rebecca Law
2017-02-14 09:59:33 +00:00
parent 2346634fec
commit 681f52b691
4 changed files with 1 additions and 6 deletions

View File

@@ -65,8 +65,6 @@ def create_app(app_name=None):
aws_ses_client.init_app(application.config['AWS_REGION'], statsd_client=statsd_client)
notify_celery.init_app(application)
encryption.init_app(application)
print(os.environ['REDIS_URL'])
print(application.config['REDIS_ENABLED'])
redis_store.init_app(application)
performance_platform_client.init_app(application)
clients.init_app(sms_clients=[firetext_client, mmg_client, loadtest_client], email_clients=[aws_ses_client])

View File

@@ -186,7 +186,6 @@ class Development(Config):
Queue('research-mode', Exchange('default'), routing_key='research-mode')
]
API_HOST_NAME = "http://localhost:6011"
REDIS_ENABLED = True
class Test(Config):

View File

@@ -1,7 +1,6 @@
import uuid
import sqlalchemy
from sqlalchemy import (desc, cast, String, text)
from sqlalchemy import (desc, text)
from app import db
from app.models import (Template, TemplateHistory)

View File

@@ -67,7 +67,6 @@ def get_template_statistics_for_7_days(limit_days, service_id):
stats = dao_get_template_usage(service_id, limit_days=limit_days)
cache_values = dict([(x.template_id, x.count) for x in stats])
redis_store.set_hash_and_expire(cache_key, cache_values, current_app.config.get('EXPIRE_CACHE_IN_SECONDS', 600))
current_app.logger.info('use redis-client: {}'.format(cache_key))
else:
stats = dao_get_templates_by_for_cache(template_stats_by_id.items())
return stats