#!/usr/bin/env python3 """测试超时提醒模板卡片发送功能""" import asyncio import sys # 添加项目路径 sys.path.insert(0, '/opt/wecom-it-desk') from app.services.reminder_service import send_reminder_message async def main(): """直接调用提醒服务发送测试消息""" # 使用一个测试用的 employee_id # 注意:需要替换为实际存在的用户 UserID test_employee_id = "sxn" # 测试用户 print(f"开始发送测试提醒到 employee_id: {test_employee_id}") try: result = await send_reminder_message(test_employee_id) print(f"发送结果: {result}") except Exception as e: print(f"发送失败: {e}") import traceback traceback.print_exc() if __name__ == "__main__": asyncio.run(main())