feat: 短信服务连接不上时raise exception
This commit is contained in:
parent
c9fc726139
commit
13d9d6a752
|
|
@ -8,7 +8,7 @@ from apps.utils.decorators import auto_log
|
||||||
# 实例化myLogger
|
# 实例化myLogger
|
||||||
myLogger = logging.getLogger('log')
|
myLogger = logging.getLogger('log')
|
||||||
|
|
||||||
@auto_log(name='阿里云短信', raise_exception=False, send_mail=True)
|
@auto_log(name='阿里云短信', raise_exception=True, send_mail=True)
|
||||||
def send_sms(phone: str, template_code: int, template_param: dict):
|
def send_sms(phone: str, template_code: int, template_param: dict):
|
||||||
config = get_sysconfig()
|
config = get_sysconfig()
|
||||||
client = AcsClient(config['sms']['xn_key'], config['sms']['xn_secret'], 'default')
|
client = AcsClient(config['sms']['xn_key'], config['sms']['xn_secret'], 'default')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue