create: 首页学习按钮需要 work 状态推送
MemRelay-Operation: memory-save:mem-20261116-reactive-study-btn MemRelay-Resource: 27876bc6-6c18-4036-9ddd-1f3de6c990ef
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: 首页学习按钮需要 work 状态推送
|
||||
type: experience
|
||||
permalink: main/projects/f5708b07-f0ea-42a4-b4ed-0e5443990ff9/首页学习按钮需要-work-状态推送
|
||||
stable_id: 27876bc6-6c18-4036-9ddd-1f3de6c990ef
|
||||
scope: project
|
||||
memory_type: experience
|
||||
project_id: f5708b07-f0ea-42a4-b4ed-0e5443990ff9
|
||||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||
status: active
|
||||
revision: 1
|
||||
request_id: mem-20261116-reactive-study-btn
|
||||
created_at: '2026-11-15T16:56:07.033930+00:00'
|
||||
updated_at: '2026-11-15T16:56:07.033930+00:00'
|
||||
tags:
|
||||
- autostudy
|
||||
- websocket
|
||||
- homepage
|
||||
---
|
||||
|
||||
学习 work 结束后若 drop_work/想要位不调 study_push.notify,首页 WebSocket 仍是上一帧 started=true,按钮停在「停止」,用户不刷新会误以为还在跑。
|
||||
|
||||
解法:want_work、drop_work、halt_work 都要 _notify;_finish_user 与 drop_work 的两次 notify 被 80ms 合并成 started=false。
|
||||
|
||||
首页:WS onopen/onclose 立刻 HTTP 拉状态;ping 8s;visibility/focus/online/pageshow 唤醒。不要用 TestClient receive_json 等待 notify,会死锁。
|
||||
Reference in New Issue
Block a user