Buckets:

download
raw
984 Bytes
import dramatiq
from fief.repositories import (
AuthorizationCodeRepository,
EmailVerificationRepository,
LoginSessionRepository,
OAuthSessionRepository,
RefreshTokenRepository,
RegistrationSessionRepository,
SessionTokenRepository,
)
from fief.repositories.base import ExpiresAtRepositoryProtocol
from fief.tasks.base import TaskBase
repository_classes: list[type[ExpiresAtRepositoryProtocol]] = [
AuthorizationCodeRepository,
EmailVerificationRepository,
LoginSessionRepository,
OAuthSessionRepository,
RefreshTokenRepository,
RegistrationSessionRepository,
SessionTokenRepository,
]
class CleanupTask(TaskBase):
__name__ = "cleanup"
async def run(self):
async with self.get_main_session() as session:
for repository_class in repository_classes:
repository = repository_class(session)
await repository.delete_expired()
cleanup = dramatiq.actor(CleanupTask())

Xet Storage Details

Size:
984 Bytes
·
Xet hash:
d3510290f195250611d0ac0ae8e8abce4baebcf27847ce2eb83e1ff97e9f0981

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.