优化这段代码 if list_send_time == send_time: if sms_list_meta['status'] == "已完成": log.info("Sms Task Send Successfully") elif sms_list_meta['status'] == "发送中": log.info("Sms Task is Sending") elif sms_list_meta["status"] == "待发送": log.info("Sms Task TOBE Send")
时间: 2023-04-06 15:01:36 浏览: 197
VB-list.rar_list_list vb_list Visual Basic_list vb_vb list
可以将代码优化为:
if list_send_time == send_time:
status = sms_list_meta['status']
if status == "已完成":
log.info("Sms Task Send Successfully")
elif status == "发送中":
log.info("Sms Task is Sending")
elif status == "待发送":
log.info("Sms Task TOBE Send")
阅读全文