You've already forked hotpocket
BTHLABS-66: Prepping for public release: Take one
This commit is contained in:
20
services/backend/hotpocket_backend/apps/accounts/tasks.py
Normal file
20
services/backend/hotpocket_backend/apps/accounts/tasks.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from celery import shared_task
|
||||
from django import db
|
||||
|
||||
from hotpocket_backend.apps.accounts.services import AuthKeysService
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@shared_task
|
||||
def clean_expired_auth_keys():
|
||||
with db.transaction.atomic():
|
||||
deleted_count = AuthKeysService().clean_expired_auth_keys()
|
||||
LOGGER.debug(
|
||||
'Deleted expired AuthKey objects: deleted_count=`%d`', deleted_count,
|
||||
)
|
||||
Reference in New Issue
Block a user