fix delete
This commit is contained in:
@@ -31,7 +31,7 @@ def update_transmission_data():
|
|||||||
|
|
||||||
|
|
||||||
def clean_old_torrents():
|
def clean_old_torrents():
|
||||||
expired_date = timezone.now() - timedelta(days=settings.TORRENT_TTL)
|
expired_date = timezone.now() - timedelta(seconds=settings.TORRENT_TTL)
|
||||||
torrent = Torrent.objects.filter(date_created__lt=expired_date).first()
|
torrent = Torrent.objects.filter(date_created__lt=expired_date).first()
|
||||||
if torrent:
|
if torrent:
|
||||||
print(f"delete torrent {torrent.name}")
|
print(f"delete torrent {torrent.name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user