Skip to content

Commit ef9eb69

Browse files
jubradclaude
andcommitted
persist: keep Azure tokens fresh with per-scope-set background tasks
Address review feedback. get_token runs on every storage request, so even an inline refresh of a still-usable token stalls the request that hits the refresh window, and a single refresh mutex serializes refreshes across scope sets. Each scope set now gets a token slot and a background task that fetches a replacement within TOKEN_REFRESH_BUFFER of expiry, retrying failures at TOKEN_REFRESH_RETRY_INTERVAL while the slot keeps serving the last good token. get_token reduces to a map lookup and a slot read, blocking only on the first use of a scope set. Dropping the credential or calling clear_cache aborts the tasks. Part of CLO-190. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 51da79c commit ef9eb69

1 file changed

Lines changed: 210 additions & 187 deletions

File tree

0 commit comments

Comments
 (0)