Skip to content

Commit a3ca16a

Browse files
authored
Task/remove seed (#372)
* Remove seeded_at key * fix
1 parent 0f05333 commit a3ca16a

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/actions/waffles/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ docopt==0.6.2
22
Flask==2.3.3
33
markupsafe==2.1.5
44
setuptools==75.6.0 # required for distutils in Python 3.12
5-
git+https://github.com/cds-snc/notifier-utils.git@53.2.3#egg=notifications-utils
5+
git+https://github.com/cds-snc/notifier-utils.git@53.2.4#egg=notifications-utils

notifications_utils/clients/redis/annual_limit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
EMAIL_DELIVERED_TODAY = "email_delivered_today"
4848
SMS_FAILED_TODAY = "sms_failed_today"
4949
EMAIL_FAILED_TODAY = "email_failed_today"
50+
SEEDED_AT = "seeded_at"
5051
TOTAL_SMS_FISCAL_YEAR_TO_YESTERDAY = "total_sms_fiscal_year_to_yesterday"
5152
TOTAL_EMAIL_FISCAL_YEAR_TO_YESTERDAY = "total_email_fiscal_year_to_yesterday"
5253

@@ -64,7 +65,6 @@
6465
NEAR_EMAIL_LIMIT = "near_email_limit"
6566
OVER_SMS_LIMIT = "over_sms_limit"
6667
OVER_EMAIL_LIMIT = "over_email_limit"
67-
SEEDED_AT = "seeded_at"
6868

6969
STATUS_FIELDS = [NEAR_SMS_LIMIT, NEAR_EMAIL_LIMIT, OVER_SMS_LIMIT, OVER_EMAIL_LIMIT]
7070

@@ -194,7 +194,8 @@ def reset_all_notification_counts(self, service_ids=None):
194194
if not service_ids
195195
else [annual_limit_notifications_v2_key(service_id) for service_id in service_ids]
196196
)
197-
self._redis_client.delete_hash_fields(hashes=hashes, fields=NOTIFICATION_FIELDS_V2)
197+
# We also want to remove the seeded_at field from the notifications_v2 hash
198+
self._redis_client.delete_hash_fields(hashes=hashes, fields=NOTIFICATION_FIELDS_V2 + [SEEDED_AT])
198199
# TODO: Remove the else once all services have been migrated to the new Redis structure
199200
hashes = (
200201
annual_limit_notifications_key("*")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "notifications-utils"
3-
version = "53.2.3"
3+
version = "53.2.4"
44
description = "Shared python code for Notification - Provides logging utils etc."
55
authors = ["Canadian Digital Service"]
66
license = "MIT license"

0 commit comments

Comments
 (0)