# # -*- coding: utf-8 -*-
# from django.core.management.base import BaseCommand
# from doris.models.service import SubmissionCommodity, UnitRelateService
# from django.conf import settings
# import datetime
# from injection.data_sync.tasks import write_to_es
#
#
# class Command(BaseCommand):
#     def handle(self, *args, **options):
#         ids = UnitRelateService.objects.using(settings.POSEIDON_DB_NAME)\
#             .filter(update_time__gte=datetime.date.today()).order_by('-id').values_list('id', flat=True)
#         print("update_number:")
#         print(len(ids))
#         if ids:
#             for i in range(0, len(ids), 10):
#                 write_to_es("lbs_clone", ids[i:i + 10], None)
#         print("update done")
#
#
#
#
#
