- Improved bidirectional synchronization logic in KommunikationSyncManager:
- Added initial sync handling to prevent duplicates.
- Optimized hash calculation to only write changes when necessary.
- Enhanced conflict resolution with clearer logging and handling of various scenarios.
- Refactored diff computation for better clarity and maintainability.
- Updated beteiligte_sync_event_step to ensure proper lock management:
- Added error handling for entity fetching and retry logic.
- Improved logging for better traceability of sync actions.
- Ensured lock release in case of unexpected errors.
- Added logic to reset permanently_failed entities that have reached their auto-reset threshold in `beteiligte_sync_cron_step.py`.
- Enhanced event handling in `beteiligte_sync_event_step.py` to skip retries if the next retry time has not been reached.
- Introduced validation checks after sync operations to ensure data consistency and integrity.
- Created detailed documentation outlining the fixes and their impacts on the sync process.
- Added scripts for analyzing sync issues and comparing entities to facilitate debugging and validation.
- Added KommunikationSyncManager class to handle synchronization logic.
- Implemented methods for loading data, computing diffs, and applying changes between Advoware and EspoCRM.
- Introduced 3-way diffing mechanism to intelligently resolve conflicts.
- Added helper methods for creating empty slots and detecting changes in communications.
- Enhanced logging for better traceability during synchronization processes.