Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth: execute async scheduled refresh callback #6084

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion panel/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ def _schedule_refresh(self, expiry_ts, user, refresh_token, application, request
expiry_date = dt.datetime.now() + dt.timedelta(seconds=expiry_seconds) # schedule_task is in local TZ
refresh_cb = partial(self._scheduled_refresh, user, refresh_token, application, request)
if expiry_seconds <= 0:
refresh_cb()
state.execute(refresh_cb)
return
task = f'{user}-refresh-access-tokens'
try:
Expand Down
Loading