本卡屬 FR-196(母卡 CM-3875(已建)),卡 P-5,第三期批 8。只改 jedi-python-package。依賴:P-3。

這張卡做什麼(白話)

通知中心套件第五棒:即時推播的套件側。提供一個 SocketIO 頻道處理類(連上就進自己的房間)和一個「未讀數變了」的推送實作,只推訊號不推內容,瀏覽器收到再用一般 API 拉。

reuse/extend/new

照型 new:handler 照 jedi-survey fill_survey_socketio_handler.py(on_connect/join_room/emit);套件只提供 handler 類與 notifier 實作,登記在宿主

在哪裡

repo:~/Projects/Jedicogy/module/jedi-python-package
改既有:jedi-notification-center/jedi_notification_center/plugin/contract.py(export handler 類名)
新開:jedi-notification-center/jedi_notification_center/realtime/handler.py
新開:jedi-notification-center/jedi_notification_center/realtime/socketio_notifier.py
新開:jedi-notification-center/tests/test_realtime.py(notifier 對假 socketio emit 一次、payload 無內容)

怎麼做

驗收(首腦照這個驗)

tests 綠;payload 只有 {"event":"unread_changed"};handler 未帶 token 連線被 AuthenticatedNamespace 拒

必讀

紀律