mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 09:12:06 -05:00
Pushed the cache increment into the shared code that persists notifications.
Much simpler implementation, inc code removed from tasks and V1/V2 rest clients.
This commit is contained in:
@@ -10,7 +10,7 @@ from app.clients import redis
|
||||
|
||||
def check_service_message_limit(key_type, service):
|
||||
if key_type != KEY_TYPE_TEST:
|
||||
cache_key = redis.cache_key(service.id)
|
||||
cache_key = redis.daily_limit_cache_key(service.id)
|
||||
service_stats = redis_store.get(cache_key)
|
||||
if not service_stats:
|
||||
service_stats = services_dao.fetch_todays_total_message_count(service.id)
|
||||
|
||||
Reference in New Issue
Block a user