#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__: vv
# Date: 2019/9/6

from django.core.management import BaseCommand

from api.tasks.sync_bdtransfer_status import check_clues_first_stage_status, check_second_and_third_stage


class Command(BaseCommand):
    def add_arguments(self, parser):
        parser.add_argument('-t', '--type', type=str, help="")

    def handle(self, *args, **options):
        type = options['type']
        print("-----------start to handle-------")

        if type == "f":
            check_clues_first_stage_status()
        elif type == "s":
            check_second_and_third_stage()
        print('-----------end to handle---------')
