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

metha-sync should catch SIGINT #32

Open
nichtich opened this issue Jun 22, 2023 · 3 comments
Open

metha-sync should catch SIGINT #32

nichtich opened this issue Jun 22, 2023 · 3 comments

Comments

@nichtich
Copy link

nichtich commented Jun 22, 2023

Running metha-sync can take a long time. Aborting with Ctrl+C (SIGINT) should be possible to just keep what has been harvested so far. By now SIGINT will leave METHA_DIR in a corrupted state with temporary files instead of .gz files. Better catch SIGINT and finish zipping the files instead.

miku added a commit that referenced this issue Jun 22, 2023
@miku
Copy link
Owner

miku commented Jun 22, 2023

Thanks for the cue. This should be possible today.

We respond to SIGINT.

However, I added os.Kill in addition to os.Interrupt - in 0.2.40.

@nichtich
Copy link
Author

Thanks for quick reply! Your solution is not what I was looking for (a way to manually abort download without loosing the downloaded files) but it's a valid design choice to remove up everything when killed with Ctrl+C.

miku added a commit that referenced this issue Jun 22, 2023
@miku
Copy link
Owner

miku commented Jun 22, 2023

Now I understand: the temporary files should be kept, since there may be thousand of them gather over many hours (I remember some endpoints).

I added a -k flag to keep temporary files around in 0.2.41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants