mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
21 lines
507 B
Python
21 lines
507 B
Python
import logging
|
|
|
|
from registration.models import RegistrationProfile
|
|
|
|
class RemoveExpiredProfiles():
|
|
"""
|
|
Deletes expired profile requests
|
|
"""
|
|
|
|
# run every 2 hours
|
|
run_every = 7200
|
|
|
|
@property
|
|
def _logger(self):
|
|
if not hasattr(self, '__logger'):
|
|
self.__logger = logging.getLogger(__name__)
|
|
return self.__logger
|
|
|
|
def job(self):
|
|
RegistrationProfile.objects.delete_expired_users()
|