From 63edacacbf7616b4695ff8e421596d53e6283f71 Mon Sep 17 00:00:00 2001 From: Nell Date: Sat, 22 Nov 2025 08:46:03 +0100 Subject: [PATCH] fix delete --- app/torrent/management/commands/torrent_event.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/torrent/management/commands/torrent_event.py b/app/torrent/management/commands/torrent_event.py index 3b089c8..a6fcd6f 100644 --- a/app/torrent/management/commands/torrent_event.py +++ b/app/torrent/management/commands/torrent_event.py @@ -34,6 +34,7 @@ def clean_old_torrents(): expired_date = timezone.now() - timedelta(days=settings.TORRENT_TTL) torrent = Torrent.objects.filter(date_created__lt=expired_date).first() if torrent: + print(f"delete torrent {torrent.name}") torrent.delete() @@ -45,7 +46,7 @@ class Command(BaseCommand): }, "clean_old_torrents": { "func": clean_old_torrents, - "schedule": 60.0 + "schedule": 5.0 } } histories = {}