mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Fixed log cleanup job
This commit is contained in:
@@ -18,7 +18,7 @@ def clear_stale_cache(cache_extension=0):
|
||||
def clear_old_logs():
|
||||
log = clear_old_logs.get_logger()
|
||||
|
||||
time = datetime.utcnow() - timedelta(day=settings.EVE_PROXY_KEEP_LOGS)
|
||||
time = datetime.utcnow() - timedelta(days=settings.EVE_PROXY_KEEP_LOGS)
|
||||
objs = ApiAccessLog.objects.filter(time_access__lt=time)
|
||||
log.info('Removing %s old access logs' % objs.count())
|
||||
objs.delete()
|
||||
|
||||
Reference in New Issue
Block a user