Skip to content

Commit

Permalink
fix: retry command call and settings (#3442)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikuke authored Oct 15, 2024
1 parent bfa6591 commit 6882559
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/benefit/applications/jobs/hourly/hourly_ahjo_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ 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
)
call_command(
"send_ahjo_requests",
request_type=AhjoRequestType.GET_DECISION_DETAILS,
retry_failed_older_than_hours=retry_threshold,
retry_failed_older_than=retry_threshold,
)

0 comments on commit 6882559

Please sign in to comment.