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

Message queue for the sync #3557

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Message queue for the sync #3557

merged 2 commits into from
Jul 26, 2023

Conversation

felipeelia
Copy link
Member

@felipeelia felipeelia commented Jul 25, 2023

Description of the Change

This PR fixes the problem outlined in #3510 by adding a small message queue to the sync script.

A few things to note:

  1. The sync script accepts a total_attempts parameter. The script will try that number of times to sync a batch;
  2. For the dashboard sync, total_attemps it 3;
  3. As the dashboard sync relies on several AJAX calls, the process is interrupted and started every time it calls the output method (so the AJAX request is replied to with a message.)
  4. When we output during one of those tries, the script exits earlier than we need, not setting the last processed item ID properly

With the message queue in place, we avoid calling the output method in the middle of the process.

Closes #3510

Changelog Entry

Fixed - Same error message being displayed more than once on the Dashboard sync

Credits

Props @felipeelia, @MARQAS, @tott, and @wildberrylillet.

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Co-authored-by: Thorsten Ott <tott@users.noreply.github.com>
@felipeelia felipeelia merged commit 820870a into develop Jul 26, 2023
7 of 8 checks passed
@felipeelia felipeelia deleted the fix/issue-3510 branch July 26, 2023 13:28
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

Successfully merging this pull request may close these issues.

BUG: Sync with failed objects (Password protected MS Office Documents) is incomplete in 4.6.0
1 participant