Exemple #1
0
def build_disha_dump():
    # Weekly refresh of disha dumps for current and last month
    month = date.today().replace(day=1)
    last_month = month - timedelta(days=1)
    last_month = last_month.replace(day=1)
    celery_task_logger.info("Started dumping DISHA data")
    build_dumps_for_month(month, rebuild=True)
    build_dumps_for_month(last_month, rebuild=True)
    celery_task_logger.info("Finished dumping DISHA data")
Exemple #2
0
def build_disha_dump():
    # Weekly refresh of disha dumps for current and last month
    month = date.today().replace(day=1)
    last_month = month - timedelta(days=1)
    last_month = last_month.replace(day=1)
    celery_task_logger.info("Started dumping DISHA data")
    build_dumps_for_month(month, rebuild=True)
    build_dumps_for_month(last_month, rebuild=True)
    celery_task_logger.info("Finished dumping DISHA data")
 def handle(self, month, rebuild, *args, **kwargs):
     print("Building for month {}".format(str(month)))
     build_dumps_for_month(month, rebuild)
     extra_months = kwargs.get('extra_months', 0)
     for i in range(extra_months):
         extra_month = add_months_to_date(month, i + 1)
         assert extra_month < datetime.today().date(
         ), "Building for future months is not a valid operation"
         print("Building for extra month {}".format(str(extra_month)))
         build_dumps_for_month(extra_month, rebuild)
Exemple #4
0
 def handle(self, month, *args, **kwargs):
     build_dumps_for_month(month)
Exemple #5
0
def build_disha_dump():
    month = date.today().replace(day=1)
    celery_task_logger.info("Started dumping DISHA data")
    build_dumps_for_month(month)
    celery_task_logger.info("Finished dumping DISHA data")