kragniz / kragniz/python-etcd3
Watching breaks Ctrl+c
- Lingua principale
- Python
- Stelle
- 450
- Fork
- 194
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
To reproduce, run make a `watcher.py`:
```python
import etcd3
etcd = etcd3.client()
etcd.put('/doot/watch', 'dfdd')
for event, cancel in etcd.watch_prefix('/doot/watch'):
print(event)
```
I'd expect Ctrl+c to exit the process, but that doesn't work:
```
(py27) ~/g/python-etcd3 (feature-watch) $ python watcher.py
header {
cluster_id: 14841639068965178418
member_id: 10276657743932975437
revision: 5057
raft_term: 4
}
created: true
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
```
Sending a SIGTERM makes it exit.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia eseguendo la riproduzione con watcher.py e segui l’entry point etcd.watch_prefix utilizzato dal loop. Verifica come viene gestito Ctrl+C mentre il watch è bloccato; il lavoro è completato quando il processo termina su SIGINT come previsto, preservando il normale comportamento del watch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- distributed-systems
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100