From 68825594414491e8b317728cc0af62fd2722adbb Mon Sep 17 00:00:00 2001 From: rikuke <33894149+rikuke@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:55:59 +0300 Subject: [PATCH] fix: retry command call and settings (#3442) --- .../applications/jobs/hourly/hourly_ahjo_job.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/benefit/applications/jobs/hourly/hourly_ahjo_job.py b/backend/benefit/applications/jobs/hourly/hourly_ahjo_job.py index e2fcebea86..474f783fcd 100644 --- a/backend/benefit/applications/jobs/hourly/hourly_ahjo_job.py +++ b/backend/benefit/applications/jobs/hourly/hourly_ahjo_job.py @@ -16,29 +16,29 @@ class Job(HourlyJob): def execute(self): call_command("refresh_ahjo_token") - retry_threshold = 1 + retry_threshold = settings.AHJO_RETRY_FAILED_OLDER_THAN if settings.ENABLE_AHJO_AUTOMATION: call_command( "send_ahjo_requests", request_type=AhjoRequestType.OPEN_CASE, - retry_failed_older_than_hours=retry_threshold, + retry_failed_older_than=retry_threshold, ) call_command( "send_ahjo_requests", request_type=AhjoRequestType.SEND_DECISION_PROPOSAL, - retry_failed_older_than_hours=retry_threshold, + retry_failed_older_than=retry_threshold, ) call_command( "send_ahjo_requests", request_type=AhjoRequestType.UPDATE_APPLICATION, - retry_failed_older_than_hours=retry_threshold, + retry_failed_older_than=retry_threshold, ) call_command( "send_ahjo_requests", request_type=AhjoRequestType.DELETE_APPLICATION, - retry_failed_older_than_hours=retry_threshold, + retry_failed_older_than=retry_threshold, ) call_command( "send_ahjo_requests", request_type=AhjoRequestType.GET_DECISION_DETAILS @@ -46,5 +46,5 @@ def execute(self): call_command( "send_ahjo_requests", request_type=AhjoRequestType.GET_DECISION_DETAILS, - retry_failed_older_than_hours=retry_threshold, + retry_failed_older_than=retry_threshold, )