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

Batch sync jobs #469

Closed
sssoleileraaa opened this issue Jul 9, 2019 · 1 comment
Closed

Batch sync jobs #469

sssoleileraaa opened this issue Jul 9, 2019 · 1 comment

Comments

@sssoleileraaa
Copy link
Contributor

Description

See parent issue #468

We want to wait before telling the user that a sync is finished until after everything in a sync batch has been downloaded and decrypted.

This means we need a way to indicate the end of a batch.

First idea: Create a SyncFinishedJob (or maybe call it BatchJob) that we add to the end of our queue after enqueing all new messages and replies. This job will give us a simple way to send the synced signal if it returns successfully, which it will always do if it's processed.

Second idea: We could create a parameter for DownloadJob that indicates whether or not the job is the last job to be processed in the sync. We could call it last_sync_job or something like that. When the job finishes, it can send this in its result.

More I think about it, the more I like the second idea.

@sssoleileraaa
Copy link
Contributor Author

#468 and this issue are pretty much the same so closing

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

1 participant