Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Client] Make client accept ctrl-c and exit safely (ie with no transactions mid push, or unwritten) #1970

Open
mickvandijke opened this issue Jul 16, 2024 · 2 comments
Assignees
Labels
Help Needed Extra attention is needed

Comments

@mickvandijke
Copy link
Contributor

mickvandijke commented Jul 16, 2024

The CLI app should gracefully exit when receiving the SIGINT (ctrl_c) signal. That means that important operations in action should either finish to completion or do a cleanup before exiting.

@mickvandijke mickvandijke self-assigned this Jul 16, 2024
@mickvandijke
Copy link
Contributor Author

mickvandijke commented Jul 16, 2024

Issue stalled. I really can not figure it out without major refactors. My idea was to spawn a new Tokio task for each command and awaiting gracefully in the main thread when receiving the ctrl_c signal using Tokio select. Unfortunately, the Opt struct contained several fields that do not implement Send, which makes it difficult to share it between threads.

Unassigned myself for now so that someone else could pick it up.

@mickvandijke mickvandijke removed their assignment Jul 16, 2024
@happybeing
Copy link
Contributor

I'd like to add that this would also apply to third party clients using the Autonomi API, so any measures should be able to be applied to any app using the APIs.

@mickvandijke mickvandijke added the Help Needed Extra attention is needed label Jul 16, 2024
@b-zee b-zee self-assigned this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Needed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants