commit
48c8d1fe90
@ -39,13 +39,13 @@ async def baidu_sms_kafka_consumer(ns={}):
|
||||
pass
|
||||
|
||||
total_count = 0
|
||||
for i in range(20):
|
||||
for i in range(1):
|
||||
# if i == 0:
|
||||
# # 写入文件记录轮询开始时间 时间格式: YYYY-MM-DD HH:MM:SS
|
||||
# with open('baidu_kafka_msg.txt', 'a', encoding='utf-8') as f:
|
||||
# f.write(f"轮询开始时间:{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
|
||||
|
||||
msg = consumer.poll(0.2) # 单次轮询获取消息
|
||||
msg = consumer.poll(1) # 单次轮询获取消息
|
||||
|
||||
if msg is None:
|
||||
if i == 10:
|
||||
|
||||
2
baidu_kafka_error.txt
Normal file
2
baidu_kafka_error.txt
Normal file
@ -0,0 +1,2 @@
|
||||
2025-11-20 17:24:21 - 错误: 未找到百度用户ID 2529cb85e30a4d51a348e71edf5fa947 对应的本地用户
|
||||
2025-11-20 17:28:43 - 错误: 未找到百度用户ID 2529cb85e30a4d51a348e71edf5fa947 对应的本地用户
|
||||
2
baidu_kafka_id.txt
Normal file
2
baidu_kafka_id.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Message_fabaab3c68a6436cbfe483634b77bcda
|
||||
Message_fb0d466fd8444a1987ac5bab8d7d0250
|
||||
17
baidu_kafka_msg.txt
Normal file
17
baidu_kafka_msg.txt
Normal file
@ -0,0 +1,17 @@
|
||||
轮询开始时间:2025-11-20 17:18:31
|
||||
轮询开始时间:2025-11-20 17:24:18
|
||||
{'id': 'Message_fabaab3c68a6436cbfe483634b77bcda', 'taskId': 'Task_a97448bf43af415c861f4655e3f6927a', 'userId': '2529cb85e30a4d51a348e71edf5fa947', 'accountId': '2529cb85e30a4d51a348e71edf5fa947', 'userType': 'account', 'receiverId': '13261188523', 'contentVar': '', 'sendChannel': 'MOBILE', 'content': '验证码为:925124,感谢您使用百度云服务,请填写完整完成验证。', 'messageTemplateId': 'MOBILE_6720338bf9c04712933f50a2630fbba9', 'messageTemplate': {'id': 'MOBILE_6720338bf9c04712933f50a2630fbba9', 'name': 'IAM验证码通知', 'tag': 'iam', 'product': '', 'type': 'CUSTOM', 'sendChannel': 'MOBILE', 'locale': 'zh-CN', 'taskTemplateId': 'ffc54482-3528-41f8-85d8-5ad44c9e53d7', 'channelTemplateId': '', 'parentId': '', 'content': '验证码为:${code},感谢您使用百度云服务,请填写完整完成验证。', 'contentType': 'TEXT', 'sign': '', 'createTime': '2017-12-07T17:44:17Z', 'createBy': 'UUAP:dengxiaochao', 'updateTime': '2025-11-18T18:18:58Z', 'updateBy': 'UUAP:dengxiaochao'}, 'isVirtualStore': True, 'channelMessageId': None, 'channelStatus': None, 'majorCategory': '03', 'minorCategory': '03002', 'status': 'NEW', 'createTime': '2025-11-20T09:22:32Z', 'updateTime': None, 'expireTime': None, 'windowTime': None, 'valid': True, 'sendComplete': False, 'disturbHold': False, 'complete': False}
|
||||
轮询开始时间:2025-11-20 17:25:45
|
||||
轮询开始时间:2025-11-20 17:25:54
|
||||
轮询开始时间:2025-11-20 17:26:07
|
||||
轮询开始时间:2025-11-20 17:26:17
|
||||
轮询开始时间:2025-11-20 17:26:26
|
||||
轮询开始时间:2025-11-20 17:26:36
|
||||
轮询开始时间:2025-11-20 17:27:38
|
||||
轮询开始时间:2025-11-20 17:27:46
|
||||
轮询开始时间:2025-11-20 17:27:55
|
||||
轮询开始时间:2025-11-20 17:28:04
|
||||
轮询开始时间:2025-11-20 17:28:21
|
||||
轮询开始时间:2025-11-20 17:28:30
|
||||
轮询开始时间:2025-11-20 17:28:38
|
||||
{'id': 'Message_fb0d466fd8444a1987ac5bab8d7d0250', 'taskId': 'Task_a7cc98a04bf74ffe97d36a34008b66e3', 'userId': '2529cb85e30a4d51a348e71edf5fa947', 'accountId': '2529cb85e30a4d51a348e71edf5fa947', 'userType': 'account', 'receiverId': '13261188523', 'contentVar': '', 'sendChannel': 'MOBILE', 'content': '验证码为:925124,感谢您使用百度云服务,请填写完整完成验证。', 'messageTemplateId': 'MOBILE_6720338bf9c04712933f50a2630fbba9', 'messageTemplate': {'id': 'MOBILE_6720338bf9c04712933f50a2630fbba9', 'name': 'IAM验证码通知', 'tag': 'iam', 'product': '', 'type': 'CUSTOM', 'sendChannel': 'MOBILE', 'locale': 'zh-CN', 'taskTemplateId': 'ffc54482-3528-41f8-85d8-5ad44c9e53d7', 'channelTemplateId': '', 'parentId': '', 'content': '验证码为:${code},感谢您使用百度云服务,请填写完整完成验证。', 'contentType': 'TEXT', 'sign': '', 'createTime': '2017-12-07T17:44:17Z', 'createBy': 'UUAP:dengxiaochao', 'updateTime': '2025-11-18T18:18:58Z', 'updateBy': 'UUAP:dengxiaochao'}, 'isVirtualStore': True, 'channelMessageId': None, 'channelStatus': None, 'majorCategory': '03', 'minorCategory': '03002', 'status': 'NEW', 'createTime': '2025-11-20T09:28:15Z', 'updateTime': None, 'expireTime': None, 'windowTime': None, 'valid': True, 'sendComplete': False, 'disturbHold': False, 'complete': False}
|
||||
@ -183,7 +183,7 @@ def setup_scheduler():
|
||||
scheduler.add_job(
|
||||
task_executor.get_baidu_kafka_info,
|
||||
'interval',
|
||||
seconds=6,
|
||||
seconds=2,
|
||||
id='get_baidu_kafka_info_job',
|
||||
replace_existing=True
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user