# -*- coding: utf-8 -*-
''' 自动虚拟拼团 距离拼团结束2小时触发自动虚拟组团 '''
''' 添加crontab任务 每小时执行一次 '''
from datetime import datetime

from django.core.management import BaseCommand
from pay.tasks.groupbuy_task import groupbuy_robot_join

class Command(BaseCommand):

    def handle(self, *args, **options):
        print('start robot join groupbuy at ', datetime.now())
        groupbuy_robot_join()
        print('end robot join groupbuy at ', datetime.now())
