#! /usr/bin/env python
# -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from api.tasks.stats_everyday_doctorconversation import async_new_conversation_everyday
from datetime import datetime, date, timedelta


class Command(BaseCommand):
    """
    恢复私信统计数据
    """
    def handle(self, *args, **options):
        print("start")
        exec_date = date.today() - timedelta(days=2)
        async_new_conversation_everyday(exec_date)
        print("done")
