close() stops the attachment uploader without uploading pending attachments
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
从 wildedge/client.py:1000 开始,其中 WildEdge.close() 会停止 uploader,然后检查 wildedge/attachments.py 中的 AttachmentUploader.stop() 和 process_pending()。跟踪 close(timeout=...) 和 flush(timeout=...) 如何将超时状态传递给 uploader。当最后一个待处理上传在剩余超时时间内运行时,问题即视为完成;同时,无超时的关闭操作应保持当前行为,并为关闭时处于待处理状态的附件添加回归测试。
由索引模型根据 Issue 内容生成。
描述
What happens
WildEdge.close() (wildedge/client.py:1000) calls AttachmentUploader.stop() (wildedge/attachments.py), which only sets the stop event and joins the thread. The uploader runs process_pending() every DEFAULT_ATTACHMENT_FLUSH_INTERVAL_SEC (5 s), so attachments registered in the last few seconds before shutdown are not uploaded. close(timeout=...) flushes events but not attachments.
They stay in the on-disk store and go out on the next start, if there is one and they are still within max_age_s. For short-lived processes (CLI runs, scripts, a kiosk app stopped with Ctrl-C) this means the last exchanges' attachments are missing, while their events reference them (attachment_count > 0).
Verified: after close(timeout=1.5) the attachments were missing; calling client.attachment_uploader.process_pending() manually before close uploaded them.
Expected
When close(timeout=...) / flush(timeout=...) is given a timeout, run a final process_pending() (bounded by the remaining timeout) before stopping the thread. Without a timeout, keep today's fast shutdown.
SDK 0.2.2.
🤖 Generated with Claude Code
- 主要语言
- Python
- 星标
- 17
- 派生
- 1
- 平均合并
- 17 小时 5 分钟
- 30 天内合并 PR
- 34
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wild-edge/wildedge-python 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
wild-edge/wildedge-python#85 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
wild-edge/wildedge-python#78 ·
维护者通常 1 天内回复
-
vLLM integration可能重新可做 @piotrekno1 于 121 天前认领,目前没有进行中的 PR。 未关闭
wild-edge/wildedge-python#38 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 3/5 1-2 天 新手友好度 48/100
wild-edge/wildedge-python#25 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 4/5 3-5 天 新手友好度 25/100
wild-edge/wildedge-python#22 · 1 条评论 ·
维护者通常 1 天内回复
查看 wild-edge/wildedge-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 6 天内回复
-
github_actions
难度 2/5 1-3 小时 新手友好度 65/100
collective/icalendar#2003 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 79/100
-
难度 2/5 1-3 小时 新手友好度 68/100
openzim/python-scraperlib#360 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
volcengine/OpenViking#6445 ·
维护者通常 1 天内回复