-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: run refresh_ahjo_token_hourly * fix: error handling and crash of refresh_token
- Loading branch information
Showing
4 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
13 changes: 13 additions & 0 deletions
13
backend/benefit/applications/jobs/hourly/hourly_ahjo_job.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from django.core.management import call_command | ||
from django_extensions.management.jobs import HourlyJob | ||
|
||
""" | ||
A hourly job to refresh the Ahjo access token via the refresh token saved in the Django database. | ||
""" | ||
|
||
|
||
class Job(HourlyJob): | ||
help = "Hourly Ahjo refresh jobs are executed here." | ||
|
||
def execute(self): | ||
call_command("refresh_ahjo_token") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters