Task #1121
closed
Execute synchronization asynchronously
Added by Vít Švanda over 6 years ago.
Updated over 6 years ago.
Description
Execute synchronization asynchronously. More syncs for same system.
For now is:
- DefaultSynchronizationService is LRT and prototype.
- Sync executor is singleton (for same entity type).
- Scheduled LRT starts LRT (DefaultSynchronizationService).
- WF for item call SynchronizationService (singleton).
We need:
- DefaultSynchronizationService is not LRT and singleton (rename to Manager may be).
- Sync executor is prototype in the 'map' (thread save), where key is ID of sync configuration. Executor has relation to instance of LRT.
- Scheduled LRT call SynchronizationService.
- WF for item call SynchronizationService (singleton) - passes ID of Sync configuration.
- Description updated (diff)
- Status changed from New to In Progress
- % Done changed from 0 to 40
I started with refactoring LRT, Sync service, start sync processor. I have problem with sync/async tests (in ACC) now.
- % Done changed from 40 to 80
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 80 to 90
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Vít Švanda
It works and code looks nice - i like synchronization service as singleton and events removal.
I found two features, which could be implemented (not really related to this ticket but related to synchronizations :)):
- add validation, when other sync for the same config running already - prevent to try start another long running task, which fails anyway, but previously run sync will be broken too
- when sync is running, config could be disabled - config cannot be changed anyway, because running sync overrides filled values, when token is updated.
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- Assignee changed from Radek Tomiška to Vít Švanda
i did test and review, it works! Thx!
- Status changed from Needs feedback to Resolved
- Status changed from Resolved to Closed
- % Done changed from 90 to 100
- Related to Defect #1316: Synchronizations of different systems cancel each other added
Also available in: Atom
PDF