Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

close() stops the attachment uploader without uploading pending attachments

オープン 初心者向け
#62 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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=...) がどのように timeout の状態を uploader に渡すかを追跡します。残りの timeout の範囲内で最後の保留中アップロードが実行され、timeout なしのシャットダウンは現在の動作を維持し、シャットダウン時に保留中の添付ファイルに対する回帰テストが追加されれば、問題は完了します。

索引モデルが 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
平均マージ
23分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wild-edge/wildedge-python のほかの issue

wild-edge/wildedge-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。