Skip to content

Commit

Permalink
Remove TODOs from BZSyncManager (#849)
Browse files Browse the repository at this point in the history
As discussed on today's stand-up, I've removed the TODOs on
BZSyncManager class and added a small comment to state why the custom
`schedule` implementation is needed

Closes OSIDB-3205
  • Loading branch information
MrMarble authored Dec 4, 2024
2 parents 4a3647e + 998c7e1 commit 8c14f75
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions osidb/sync_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,20 +547,9 @@ def schedule(cls, sync_id, *args, **kwargs):
"""
Schedule BZSyncManager's sync_task to Celery queue.
TODO:
- This is a workaround. SyncManager.schedule should not
decide to skip or postpone tasks, but we need it to:
- Reduce noise in flower logs that would be generated
by duplicate tasks failing.
- Reduce amount of requests sent needlessly to Bugzilla.
- Avoid sending potentially incomplete data immediately.
- Move the deduplication logic to Flaw.bzsync:
- No BZSyncManager-related action upon client request.
- A periodic task to query recently changed tasks once per
X minutes and call BZSyncManager.schedule for them.
- BZSyncManager.schedule to be left not implemented,
inherited SyncManager.schedule used.
- OSIDB-3205
This implementation uses custom de-duplication logic
and a 20 seconds delay to mitigate "outdated model" conflicts on bugzilla.
See OSIDB-3205 for more details.
:param sync_id: Unique ID for synchronized data object.
"""
Expand Down

0 comments on commit 8c14f75

Please sign in to comment.