From 5f7b434afab94f06390e7a31b8ac11eac439b1b0 Mon Sep 17 00:00:00 2001 From: eheinrich Date: Wed, 19 May 2021 14:07:01 -0700 Subject: [PATCH] Delete management command to purge quicklook files since we no longer generate those files and the script is obsolete --- .../frames/management/commands/purgequicklook.py | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 archive/frames/management/commands/purgequicklook.py diff --git a/archive/frames/management/commands/purgequicklook.py b/archive/frames/management/commands/purgequicklook.py deleted file mode 100644 index 81de766..0000000 --- a/archive/frames/management/commands/purgequicklook.py +++ /dev/null @@ -1,14 +0,0 @@ -from django.core.management.base import BaseCommand -from archive.frames.models import Frame -from datetime import timedelta -from django.utils import timezone -import logging - -logger = logging.getLogger() - - -class Command(BaseCommand): - def handle(self, *args, **options): - logger.info('Purging quicklook data') - Frame.objects.filter(RLEVEL=10, DATE_OBS__lt=timezone.now() - timedelta(days=7)).delete() - Frame.objects.filter(RLEVEL=11, DATE_OBS__lt=timezone.now() - timedelta(days=7)).delete()