Task #1121
closedExecute synchronization asynchronously
100%
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.
Related issues
Updated by Vít Švanda over 6 years ago
- % 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.
Updated by Vít Švanda over 6 years ago
Done, commits:
https://github.com/bcvsolutions/CzechIdMng/commit/4fecfee2e874acb64bf9ceaec14a43f67761c9a9
https://github.com/bcvsolutions/CzechIdMng/commit/ec5d6229196fc8d357aa90aac5cd76b3ad68fcbc
Refactoring:
https://github.com/bcvsolutions/CzechIdMng/commit/acc545f21e26abcd2bcdd0cde725ebda4e5d5326
Tests:
https://github.com/bcvsolutions/CzechIdMng/commit/30d0a7ec7e91ffa0fbf97ec6d747c976361c0151
https://github.com/bcvsolutions/CzechIdMng/commit/da4cabffd16239d2829dd343451490ded02a8476
Updated by Vít Švanda over 6 years ago
Fix WF and api for unlinked situation, created tests:
https://github.com/bcvsolutions/CzechIdMng/commit/75b5feede3ac3cc796115c346d04d7cc54abaf18
Updated by Vít Švanda over 6 years ago
- % Done changed from 40 to 80
Fix WF and api for linked and missing account situations, created tests:
https://github.com/bcvsolutions/CzechIdMng/commit/364ea640cb0e9c300bd11b374dcb7ee4ddb1bf45
Updated by Vít Švanda over 6 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 80 to 90
On the end I removed a events for start and cancel sync. Documentation and changelog is completed too.
Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/1747aefc371345fc9e78425840764961aa0e7de4
Radek, could you do review please (sorry for to many commits)?
Updated by Radek Tomiška over 6 years ago
- 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.
Updated by Vít Švanda over 6 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
I added validation on start sync task, start of sync, save sync config, delete config.
https://github.com/bcvsolutions/CzechIdMng/commit/13bd730a9259ca2c68b8f839ccd4e14f863d679e
Updated by Radek Tomiška over 6 years ago
- Assignee changed from Radek Tomiška to Vít Švanda
i did test and review, it works! Thx!
Updated by Vít Švanda over 6 years ago
- Status changed from Needs feedback to Resolved
Updated by Radek Tomiška about 6 years ago
- Related to Defect #1316: Synchronizations of different systems cancel each other added