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)
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)
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)