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

No way to interrupt indexing run #3

Open
ArneBachmann opened this issue Oct 14, 2024 · 3 comments
Open

No way to interrupt indexing run #3

ArneBachmann opened this issue Oct 14, 2024 · 3 comments

Comments

@ArneBachmann
Copy link

CTRL+C doesn't get through. And when I stop via CTRL+Break (hard kill), the SQLite database transactions are not committed and therefore I cannot search anything (WAL file remains). I guess I would enjoy an interruptible and resumable index run.
E.g. using try: ... except: KeyboardInterrupt: ...

@dnlzrgz
Copy link
Owner

dnlzrgz commented Oct 16, 2024

Yes! I'm sorry, and I'm fully aware of that issue. The thing is that files are indexed using multi-threading while posts are fetched concurrently, and then, at the end, the virtual FTS5 table is updated to allow for the search. This past weekend, I was looking for solutions to close the threads gracefully, but I didn't have time to finish the changes and publish a new version.

@ArneBachmann
Copy link
Author

Oh no, don't be sorry for giving something out for free. I wrote a similar tool myself, but never got it finished, so I'm just curious in similar solutions. I could take a look, but my time is just very limited for these things.

@ArneBachmann
Copy link
Author

ArneBachmann commented Oct 16, 2024

It might be possible to .cancel() the individual index runs if you keep references to them, so that the CLI stops after the current directory. You could let the user know via a console output "[yellow]Stopping the index run..."

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