from django.core.management.base import BaseCommand
from crm.services.fetch_email_leads import sync_leads as sync_email_leads
from crm.services.fetch_excel_leads import sync_leads as sync_excel_leads


class Command(BaseCommand):

    def handle(self, *args, **kwargs):
        try:
            sync_email_leads()
        except Exception as e:
            print(e)

        try:
            sync_excel_leads()
        except Exception as e:
            print(e)
