@@ -0,0 +1,848 @@
+from django.core.management.base import BaseCommand%0Afrom django.conf import settings%0Afrom maldini.prepare import Walker%0A%0Aclass Command(BaseCommand):%0A%0A    help = %22Push files to ES%22%0A%0A    def handle(self, **options):%0A        from elasticsearch import Elasticsearch, helpers%0A        from elasticsearch.client.utils import _make_path%0A        from elasticsearch.exceptions import NotFoundError, TransportError%0A%0A        from maldini.models import Document%0A%0A        es = Elasticsearch(settings.ELASTICSEARCH_URL)%0A%0A        for doc in Document.objects.all():%0A            data = %7B%0A                'path': doc.path,%0A                'disk_size': doc.disk_size,%0A            %7D%0A            es.index(%0A                index='hoover-6',%0A                doc_type='doc',%0A                id=doc.path,%0A                body=data,%0A            )%0A            print(doc.path)%0A

send all files to ES