driplineorg / driplineorg/dripline-python
Signal handling doesn't work in interactive Python session
- Langage dominant
- Python
- Étoiles
- 3
- Forks
- 6
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Currently, to use the scarab-based signal handling you have to create a signal_handler and add the appropriate cancelable. This is fine for executables, e.g. dl-serve. However, it's not workable for an interactive session.
I created a script that uses `core.Interface` to e.g. `get peaches` from the KVS. For network reasons it wasn't able to contact the broker, so it tried multiple times using exponential backoff. I attempted to cancel that with ctrl-c, but it didn't work because the signal hadn't been setup to be caught. I got it to stop by repeating ctrl-c twice, resulting in an unhandled exception and a long traceback.
I'm not sure what the right way to handle this is, at the moment.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par core.Interface et comparez son signal_handler et sa configuration cancelable avec le chemin de l’exécutable dl-serve. Reproduisez le scénario de nouvelle tentative du broker dans une session Python interactive et vérifiez que Ctrl-C annule proprement l’opération sans exception non gérée ni long traceback ; l’issue ne nomme aucun fichier ni test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100