mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 18:38:14 -04:00
Merge pull request #2175 from GSA/change_year
Fix the time range for the message ratio calculations
This commit is contained in:
@@ -9,8 +9,8 @@ class CloudfoundryConfig:
|
|||||||
self.s3_buckets = {bucket["name"]: bucket["credentials"] for bucket in buckets}
|
self.s3_buckets = {bucket["name"]: bucket["credentials"] for bucket in buckets}
|
||||||
self._empty_bucket_credentials = {
|
self._empty_bucket_credentials = {
|
||||||
"bucket": "",
|
"bucket": "",
|
||||||
"access_key_id": "", # nosec B105
|
"access_key_id": "", # nosec B105
|
||||||
"secret_access_key": "", # nosec B105
|
"secret_access_key": "", # nosec B105
|
||||||
"region": "",
|
"region": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,8 +308,8 @@ def dao_get_notification_count_for_service(*, service_id):
|
|||||||
|
|
||||||
|
|
||||||
def dao_get_notification_count_for_service_message_ratio(service_id, current_year):
|
def dao_get_notification_count_for_service_message_ratio(service_id, current_year):
|
||||||
start_date = datetime(current_year, 6, 16)
|
start_date = datetime(current_year - 1, 6, 16)
|
||||||
end_date = datetime(current_year + 1, 6, 16)
|
end_date = datetime(current_year, 6, 16)
|
||||||
stmt1 = (
|
stmt1 = (
|
||||||
select(func.count())
|
select(func.count())
|
||||||
.select_from(Notification)
|
.select_from(Notification)
|
||||||
|
|||||||
Generated
+1000
-1045
File diff suppressed because it is too large
Load Diff
@@ -82,6 +82,7 @@ aiohttp = "^3.13.3"
|
|||||||
pytest = "^9.0.2"
|
pytest = "^9.0.2"
|
||||||
filelock = ">=3.20.3"
|
filelock = ">=3.20.3"
|
||||||
pyasn1 = ">=0.6.2"
|
pyasn1 = ">=0.6.2"
|
||||||
|
jaraco-context = ">=6.1.0"
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
|||||||
Reference in New Issue
Block a user