Commit c2ef172b authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

delete obsolete images

parent 210d6996
Pipeline #8408 failed with stage
in 2 minutes and 58 seconds
...@@ -53,6 +53,9 @@ class Command(BaseCommand): ...@@ -53,6 +53,9 @@ class Command(BaseCommand):
log(f'\nDelete perso\n') log(f'\nDelete perso\n')
call_command('delete_perso') call_command('delete_perso')
log(f'\nclean obsolete Images\n')
Image.objects.filter(robotpkg__project__archived=True).delete()
log(f'\nLook for missing images\n') log(f'\nLook for missing images\n')
for img in Image.objects.filter(created__lt=timezone.now() - timedelta(days=7)): for img in Image.objects.filter(created__lt=timezone.now() - timedelta(days=7)):
log(f' {img}') log(f' {img}')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment