Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

close() stops the attachment uploader without uploading pending attachments

Aperta Adatta ai principianti
#62 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Inizia da wildedge/client.py:1000, dove WildEdge.close() interrompe l’uploader, quindi esamina AttachmentUploader.stop() e process_pending() in wildedge/attachments.py. Traccia come close(timeout=...) e flush(timeout=...) passano lo stato del timeout all’uploader. Il problema è risolto quando un ultimo caricamento in sospeso viene eseguito entro il timeout rimanente, mentre lo spegnimento senza timeout mantiene il comportamento attuale, con un test di regressione per gli allegati in sospeso allo spegnimento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
17
Fork
1
Merge medio
23m
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wild-edge/wildedge-python

Tutte le issue di wild-edge/wildedge-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.