root
409bea3615
Update logging to use Motia workbench context for visibility
2025-10-24 00:12:53 +00:00
root
ddad58faa3
Refactor calendar sync phases into separate functions for better modularity
2025-10-24 00:10:09 +00:00
root
c91d3fc76d
Fix 'adv_map' not defined error by correcting state dict references
2025-10-24 00:08:18 +00:00
root
11ca7a5e75
Add missing phase functions to event step
2025-10-23 23:58:53 +00:00
root
3a1ed1ee55
Refactor calendar sync: move employee loop to cron step, parallel sync per employee
2025-10-23 23:57:51 +00:00
root
d15bd04167
Fix variable references in calendar sync after refactoring
2025-10-23 23:53:38 +00:00
root
a6d061a708
Refactor calendar sync: reduce redundancies, remove dead code, improve structure
...
- Remove unused share_google_calendar function
- Add centralized log_operation for consistent logging with context
- Add get_timestamps helper for Phase 4 timestamp handling
- Consolidate safe_* functions into generic safe_advoware_operation
- Optimize reload functions to handle initial fetches
- Split standardize_appointment_data into parse_times, adjust_times, build_notiz helpers
- Use state dict for better encapsulation in handler
2025-10-23 23:48:16 +00:00
root
42949c6871
Fix systemd service for automatic Motia startup
2025-10-23 23:37:52 +00:00
root
5ef77c91d5
Fix Advoware time filtering pitfall: extend ranges (Advoware -1 to +9 years, Google -2 to +10 years) and document issue in README
2025-10-23 23:28:49 +00:00
root
da2b9960b0
Fix recurring event duplication - handle recurringEventId properly in all phases
2025-10-23 18:30:46 +00:00
root
ddd64a5e0f
Fix critical bug: End date for recurring events should use 'datum' not 'datumBis'
...
- Fixed: For recurring appointments (dauertermin=1), end date now correctly uses 'datum' instead of 'datumBis'
- 'datumBis' is only for recurrence series end, not individual event duration
- Events now have correct duration instead of being capped at 24h unnecessarily
- Updated README with detailed explanation of the bug and fix
- Time breakdowns in descriptions are now accurate
2025-10-23 18:12:02 +00:00
root
08b21ef268
Fix cron handler signature: remove event parameter from cron step
...
- Fix calendar_sync_cron_step.py handler signature from (event, context) to (context)
- Cron steps only receive context parameter, not event
2025-10-23 17:33:58 +00:00
root
080eebd5ea
Fix calendar sync issues: correct True/False, limit recurrence to 2 years, add share_google_calendar function
...
- Fix Python syntax error: change 'true' to 'True' in config.py
- Limit recurring events to max 2 years to avoid Google Calendar API limits
- Add share_google_calendar function for manual calendar sharing
- Update README with calendar sync documentation
- Debug mode: limit sync to user AI only
2025-10-23 13:53:51 +00:00
root
974116c024
Sync all employees in loop, remove employee_kuerzel requirement, update README
2025-10-23 13:02:52 +00:00
root
7b6e287b66
Remove AI limit, update README, fix update loops by setting last_sync to post-update time
2025-10-23 12:57:33 +00:00
root
48ce8d8e73
Add exponential backoff for Google API calls
...
- Use backoff library with 5s base, max 5 tries for HttpError 429/5xx
- Decorate Google functions: ensure_calendar, fetch_events, create/update/delete events
- Add backoff to requirements.txt
2025-10-23 12:49:45 +00:00
root
0d758b07ea
Fix KeyError in Phase 3 recreate: use str(frnr) for adv_map key
...
- adv_map keys are str, frnr is int, so adv_map[str(frnr)] fixes KeyError
2025-10-23 12:44:54 +00:00
root
9312586f18
Fix Advoware timestamp parsing bug causing sync loops
...
- Change .replace(tzinfo=BERLIN_TZ) to BERLIN_TZ.localize() for correct pytz TZ handling
- Update Phase 4 to use proper TZ localization for adv_ts
- Add documentation section on correct Advoware timestamp handling
- Add .gitignore, GOOGLE_SETUP_README.md, and check_db.py utility
2025-10-23 12:43:22 +00:00
root
0d54243e9d
Fix Phase 3 logic for symmetric delete handling: remove 'sb' field, add employee_kuerzel to updates, correct missing event recreation/deletion based on source_system
2025-10-23 11:53:24 +00:00
root
9f50f201df
Fix Phase 4 in calendar sync to reset unauthorized changes in target system based on timestamps for source_system_wins strategy
2025-10-23 11:26:25 +00:00
root
7d5403b4af
Fix calendar sync Phase 3 logic for missing Advoware appointments when source is Google; update README with Advoware API peculiarities
2025-10-23 11:13:15 +00:00
root
96fa1f58f5
Update log message for Phase 3 delete operation to reflect the corrected logic.
2025-10-23 10:51:08 +00:00
root
6a72809817
Fix Phase 3 logic for source_system_wins: when Google event is missing and source is Google, propagate delete to Advoware instead of recreating.
2025-10-23 10:49:25 +00:00
root
ed669f8561
Fix Phase 3 delete logic for source_system_wins: propagate delete to Google when Advoware appointment is missing and source is Advoware, instead of recreating.
2025-10-23 10:42:49 +00:00
root
9ab90fef5a
Fix timestamp-based update logic and remove global last_sync update to prevent redundant syncs and race conditions. Update README with anonymization and latest changes.
2025-10-23 10:40:00 +00:00
root
1de5bcd369
Pre-optimization commit: Calendar sync implementation with hub design
2025-10-23 08:29:46 +00:00
root
2f9203cac2
Add calendar sync step files: API, cron, and event handlers for bidirectional Advoware-Google Calendar sync
2025-10-22 23:37:28 +00:00