jobs#

Transactional email and OAuth token refresh litestar-queues tasks.

Accounts domain background tasks.

async app.domain.accounts.jobs.run_refresh_oauth_tokens(alchemy_config: SQLAlchemyAsyncConfig, *, settings: Settings | None = None, transport: httpx.AsyncBaseTransport | None = None) → dict[str, int][source]#

Refresh AES-GCM-protected OAuth tokens nearing expiration using httpx.AsyncClient.

The expiring accounts are read in one short transaction and each refreshed token set is stored in its own, so no transaction is open while a provider is being called.

Returns:

Summary counts mapping for processed, refreshed, skipped, and failed accounts.