X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/19bfea4bfc35c814854192e8bf67a6ad584f44c2..2c88cd11935d3011fadcc1667ac886652ba189ca:/src/catalogue/management/commands/schedule_stale_ebooks.py diff --git a/src/catalogue/management/commands/schedule_stale_ebooks.py b/src/catalogue/management/commands/schedule_stale_ebooks.py new file mode 100644 index 000000000..91836fbf3 --- /dev/null +++ b/src/catalogue/management/commands/schedule_stale_ebooks.py @@ -0,0 +1,14 @@ +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.conf import settings +from django.core.management.base import BaseCommand + +from catalogue.fields import EbookField + + +class Command(BaseCommand): + help = 'Schedule regenerating stale ebook files.' + + def handle(self, **options): + EbookField.schedule_all_stale()