mirror of
https://github.com/idrainformatica/Linfa.git
synced 2026-04-20 00:53:53 +02:00
v1
This commit is contained in:
17
src/documents/management/commands/document_sanity_checker.py
Normal file
17
src/documents/management/commands/document_sanity_checker.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from documents.management.commands.mixins import ProgressBarMixin
|
||||
from documents.sanity_checker import check_sanity
|
||||
|
||||
|
||||
class Command(ProgressBarMixin, BaseCommand):
|
||||
help = "This command checks your document archive for issues."
|
||||
|
||||
def add_arguments(self, parser):
|
||||
self.add_argument_progress_bar_mixin(parser)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
self.handle_progress_bar_mixin(**options)
|
||||
messages = check_sanity(progress=self.use_progress_bar, scheduled=False)
|
||||
|
||||
messages.log_messages()
|
||||
Reference in New Issue
Block a user