コード例 #1
0
ファイル: api.py プロジェクト: ekush/commcare-hq
def create_billable_for_sms(msg, delay=True):
    if not msg.domain:
        return
    try:
        from corehq.apps.sms.tasks import store_billable
        if delay:
            store_billable.delay(msg)
        else:
            store_billable(msg)
    except Exception as e:
        logging.error("[BILLING] Errors Creating SMS Billable: %s" % e)
コード例 #2
0
ファイル: api.py プロジェクト: SEL-Columbia/commcare-hq
def create_billable_for_sms(msg, delay=True):
    if not msg.domain:
        return
    try:
        from corehq.apps.sms.tasks import store_billable
        if delay:
            store_billable.delay(msg)
        else:
            store_billable(msg)
    except Exception as e:
        logging.error("[BILLING] Errors Creating SMS Billable: %s" % e)
コード例 #3
0
def create_billable_for_sms(msg, delay=True):
    if not isinstance(msg, SMS):
        raise Exception("Expected msg to be an SMS")

    if settings.ENTERPRISE_MODE or not msg.domain:
        return

    try:
        from corehq.apps.sms.tasks import store_billable
        if delay:
            store_billable.delay(msg)
        else:
            store_billable(msg)
    except Exception as e:
        log_smsbillables_error("Errors Creating SMS Billable: %s" % e)
コード例 #4
0
def create_billable_for_sms(msg, delay=True):
    if not isinstance(msg, SMS):
        raise Exception("Expected msg to be an SMS")

    if not msg.domain:
        return

    try:
        from corehq.apps.sms.tasks import store_billable
        if delay:
            store_billable.delay(msg)
        else:
            store_billable(msg)
    except Exception as e:
        log_smsbillables_error("Errors Creating SMS Billable: %s" % e)