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

Queued URLs are lost when browser closes #3

Open
tjhorner opened this issue Jul 2, 2021 · 1 comment
Open

Queued URLs are lost when browser closes #3

tjhorner opened this issue Jul 2, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@tjhorner
Copy link
Collaborator

tjhorner commented Jul 2, 2021

Since the URL queue (which gets flushed automatically every 15 minutes) is stored in memory, if the user closes their browser, the queue will be lost and the URLs will never be sent to ArchiveBox. Originally, I decided that flushing the URL queue as a user closes the browser would be a good solution, but that doesn't seem to be possible.

The next best thing would be to store the URL queue in persistent storage, so the next time the user opens their browser, the URL queue can be flushed immediately and the URLs will reach ArchiveBox. However, this still depends on the user opening their browser after it closes.

I think a good solution would be to hook into other events that indicate the user may be idle, such as unfocusing the browser window, and flushing the URL queue then.

We could also make the interval at which it gets flushed configurable.

Open to ideas here!

@tjhorner tjhorner added the bug Something isn't working label Jul 2, 2021
@tjhorner tjhorner added this to the 2.0.0 milestone Jul 6, 2021
@musabgultekin
Copy link

I'm thinking to directly sending visited urls without using queue.

Why we're using queue? As archivebox already has its own queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants