feat(training): 新增精益培训周任务视频推送与定向提醒闭环
- 后端:新增周任务视频推送服务与定时任务,新增模型迁移 fb26bc033d27 - 配置:WECOM_NOTIFY_EVENTS 追加 training_lean_video_push 事件(dev/test/prod/shared 同步) - 管理端:培训配置页新增定向目标弹窗 LeanTargetModal - 工作台:完成看板提醒按钮按 sent/failed 实发统计如实提示(部分成功/失败/未发送),避免企微发送失败误报成功 - 文档:更新功能清单与技术架构,新增精益管理周任务规则手册;四语言 i18n 同步补齐
This commit is contained in:
1 parent
a0e4351e9a
commit
7927556ee2
34 files changed
+2039
-254
No files matched your search
@@ -1,15 +1,16 @@
|
||||
"""
|
||||
backend/app/services/schedule/lean_training_job.py
|
||||
|
||||
用途:将精益培训逾期提醒接入平台排程契约。
|
||||
依赖:ScheduleTask/ScheduleRun、lean_training_reminder_service。
|
||||
逻辑:平台调度器调用本入口;本入口执行提醒扫描并返回标准七元组执行结果。
|
||||
用途:将精益培训逾期提醒与每周视频推送接入平台排程契约。
|
||||
依赖:ScheduleTask/ScheduleRun、lean_training_reminder_service、lean_training_push_service。
|
||||
逻辑:平台调度器调用本入口;各入口执行对应扫描并返回标准七元组执行结果。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.models import ScheduleRun, ScheduleTask
|
||||
from app.services.lean_training_reminder_service import run_lean_training_reminders
|
||||
from app.services.lean_training_push_service import run_lean_training_video_push
|
||||
from app.services.schedule.job_registry import ScheduleExecuteResult
|
||||
|
||||
|
||||
@@ -20,3 +21,11 @@ def run_lean_training_reminder_schedule(task: ScheduleTask, run: ScheduleRun) ->
|
||||
total = result["created"] + result["skipped"]
|
||||
failed = result["failed"]
|
||||
return total, result["sent"], failed, result["skipped"], [result], [], [{"step": "lean_training_reminder", "status": "success" if not failed else "partial", "detail": result}]
|
||||
|
||||
|
||||
def run_lean_training_video_push_schedule(task: ScheduleTask, run: ScheduleRun) -> ScheduleExecuteResult:
|
||||
"""执行每周一视频推送扫描(每任务按每周任务数量推进一批)并返回推送统计。"""
|
||||
_ = task, run
|
||||
result = run_lean_training_video_push()
|
||||
failed = result["failed"]
|
||||
return result["tasks"], result["sent"], failed, result["skipped"], [result], [], [{"step": "lean_training_video_push", "status": "success" if not failed else "partial", "detail": result}]
|
||||
Reference in new issue
Block a user