mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 01:02:09 -05:00
Couple of bugs squashed.
1) It's incr not inc on the redis client, so renamed the calls everywhere 2) Redis returns bytes/string rather than an int if the value stored is an int. Cast the result to an int before use. Not you can set up the GET to do this transparently but I've not done this as we *may * use GETS for non-int and the callback sets up the cast for the connection not the call.
This commit is contained in:
@@ -151,7 +151,7 @@ def send_sms(self,
|
||||
e
|
||||
)
|
||||
else:
|
||||
redis_store.inc(cache_key(service_id))
|
||||
redis_store.incr(cache_key(service_id))
|
||||
|
||||
|
||||
@notify_celery.task(bind=True, name="send-email", max_retries=5, default_retry_delay=300)
|
||||
@@ -192,4 +192,4 @@ def send_email(self, service_id,
|
||||
e
|
||||
)
|
||||
else:
|
||||
redis_store.inc(cache_key(service_id))
|
||||
redis_store.incr(cache_key(service_id))
|
||||
|
||||
Reference in New Issue
Block a user