mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-09 06:32:11 -05:00
ugh fix flake 8
This commit is contained in:
@@ -46,13 +46,13 @@ def check_service_over_total_message_limit(key_type, service):
|
||||
cache_key = total_limit_cache_key(service.id)
|
||||
service_stats = redis_store.get(cache_key)
|
||||
|
||||
## Originally this was a daily limit check. It is now a free-tier limit check.
|
||||
## TODO is this annual or forever for each service?
|
||||
## TODO do we need a way to clear this out? How do we determine if it is
|
||||
## free-tier or paid? What are the limits for paid? Etc.
|
||||
## TODO
|
||||
## setting expiration to one year for now on the assume that the free tier
|
||||
## limit resets annually.
|
||||
# Originally this was a daily limit check. It is now a free-tier limit check.
|
||||
# TODO is this annual or forever for each service?
|
||||
# TODO do we need a way to clear this out? How do we determine if it is
|
||||
# free-tier or paid? What are the limits for paid? Etc.
|
||||
# TODO
|
||||
# setting expiration to one year for now on the assume that the free tier
|
||||
# limit resets annually.
|
||||
if service_stats is None:
|
||||
service_stats = 0
|
||||
redis_store.set(cache_key, service_stats, ex=365*24*60*60)
|
||||
|
||||
Reference in New Issue
Block a user