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 = {}