Add requests dependency to project
- Included 'requests' in the dependencies list of uv.lock. - Specified minimum version of 'requests' as 2.32.0 in requires-dist.
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
# Motia Migration Status
|
||||
|
||||
**🎉 MIGRATION KOMPLETT (außer Google Calendar Sync)**
|
||||
|
||||
> 📋 Detaillierte Analyse: [MIGRATION_COMPLETE_ANALYSIS.md](MIGRATION_COMPLETE_ANALYSIS.md)
|
||||
|
||||
## Quick Stats
|
||||
|
||||
- ✅ **17 von 21 Steps** migriert (81%)
|
||||
- ✅ **11 von 11 Service-Module** migriert (100%)
|
||||
- ✅ **~7.500 Zeilen Code** migriert (83%)
|
||||
- ✅ **13 HTTP Endpoints** aktiv
|
||||
- ✅ **7 Queue Events** konfiguriert
|
||||
- ✅ **1 Cron Job** (alle 15 Min.)
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
Migrating from **old-motia v0.17** (Node.js + Python hybrid) to **Motia III v1.0-RC** (pure Python).
|
||||
|
||||
@@ -156,7 +171,42 @@ From old `requirements.txt` and code analysis:
|
||||
- `pydantic` - Already in new system
|
||||
- `requests` / `aiohttp` - HTTP clients for Advoware API
|
||||
|
||||
## Status
|
||||
## Migration Roadmap
|
||||
|
||||
### ✅ COMPLETED
|
||||
|
||||
| Phase | Module | Lines | Status |
|
||||
|-------|--------|-------|--------|
|
||||
| **1** | Advoware Proxy (GET, POST, PUT, DELETE) | ~400 | ✅ Complete |
|
||||
| **1** | `advoware.py`, `advoware_service.py` | ~800 | ✅ Complete |
|
||||
| **2** | VMH Webhook Steps (6 endpoints) | ~900 | ✅ Complete |
|
||||
| **2** | `espocrm.py`, `espocrm_mapper.py` | ~900 | ✅ Complete |
|
||||
| **2** | `bankverbindungen_mapper.py`, `beteiligte_sync_utils.py`, `notification_utils.py` | ~1200 | ✅ Complete |
|
||||
| **3** | VMH Sync Event Steps (2 handlers + 1 cron) | ~1000 | ✅ Complete |
|
||||
| **4** | Kommunikation Sync (`kommunikation_mapper.py`, `kommunikation_sync_utils.py`) | ~1333 | ✅ Complete |
|
||||
| **5** | Adressen Sync (`adressen_mapper.py`, `adressen_sync.py`) | ~964 | ✅ Complete |
|
||||
|
||||
**Total migrated: ~7497 lines of production code**
|
||||
|
||||
### ⏳ REMAINING (Phase 6)
|
||||
|
||||
**Advoware Calendar Sync** - Google Calendar ↔ Advoware Sync:
|
||||
- `calendar_sync_cron_step.py` - Cron-Trigger für automatischen Sync
|
||||
- `calendar_sync_event_step.py` - Queue-Event Handler (**920 Zeilen!**)
|
||||
- `calendar_sync_api_step.py` - HTTP API für manuellen Trigger
|
||||
- `calendar_sync_all_step.py` - Bulk-Sync Handler
|
||||
- `calendar_sync_utils.py` - Hilfs-Funktionen
|
||||
- `audit_calendar_sync.py` - Audit-Funktion
|
||||
|
||||
**Dependencies:**
|
||||
- `google-api-python-client` - Google Calendar API
|
||||
- `google-auth` - Google OAuth2
|
||||
- PostgreSQL - Für Termine-Datenbank
|
||||
- Redis - Für Caching/Locking
|
||||
|
||||
**Estimated effort:** 3-5 Tage (komplex wegen Google API + PostgreSQL)
|
||||
|
||||
**Priority:** MEDIUM (funktioniert aktuell noch im old-motia System)
|
||||
|
||||
### Completed
|
||||
- ✅ Analysis of old system structure
|
||||
@@ -182,17 +232,30 @@ From old `requirements.txt` and code analysis:
|
||||
- `POST /vmh/webhook/bankverbindungen/update`
|
||||
- `POST /vmh/webhook/bankverbindungen/delete`
|
||||
|
||||
### Current Status: Phase 2 Complete ✅
|
||||
### Current Status: Phase 3, 4, 5 Complete ✅
|
||||
|
||||
VMH Webhook endpoints are now receiving EspoCRM webhook events and emitting queue events for processing. The webhook steps handle batch and single entity notifications and provide deduplication via the event handling system.
|
||||
**Phase 3** - VMH Sync Event Steps & Cron:
|
||||
- ✅ `beteiligte_sync_event_step.py` (mit Kommunikation Sync Integration)
|
||||
- ✅ `bankverbindungen_sync_event_step.py` (bereits migriert)
|
||||
- ✅ `beteiligte_sync_cron_step.py` (alle 15 Min., Auto-Reset für permanently_failed)
|
||||
|
||||
**Note:** The complex sync handlers (beteiligte_sync_event_step.py, bankverbindungen_sync_event_step.py) are NOT yet migrated as they require additional utility modules:
|
||||
- `services/beteiligte_sync_utils.py` (663 lines - distributed locking, retry logic, notifications)
|
||||
- `services/bankverbindungen_mapper.py` (data mapping between EspoCRM and Advoware)
|
||||
- `services/espocrm_mapper.py` (mapping utilities)
|
||||
- `services/notification_utils.py` (in-app notifications)
|
||||
**Phase 4** - Kommunikation Sync:
|
||||
- ✅ `kommunikation_mapper.py` (334 Zeilen - Mapping mit Base64 Marker)
|
||||
- ✅ `kommunikation_sync_utils.py` (999 Zeilen - Bidirektionaler Sync mit 3-Way Diffing)
|
||||
|
||||
These sync handlers process the queue events emitted by the webhook steps and perform the actual synchronization with Advoware. They will be migrated in Phase 3.
|
||||
**Phase 5** - Adressen Sync:
|
||||
- ✅ `adressen_mapper.py` (267 Zeilen - CAdressen ↔ Advoware Adressen)
|
||||
- ✅ `adressen_sync.py` (697 Zeilen - CREATE/UPDATE mit READ-ONLY Detection)
|
||||
|
||||
### Sync-Architektur komplett:
|
||||
|
||||
1. **Webhooks** (Phase 2) → Emittieren Queue-Events
|
||||
2. **Event Handler** (Phase 3) → Verarbeiten Events mit Stammdaten-Sync
|
||||
3. **Kommunikation Sync** (Phase 4) → Bidirektionale Email/Phone-Synchronisation
|
||||
4. **Adressen Sync** (Phase 5) → Bidirektionale Adressen-Synchronisation
|
||||
5. **Cron Job** (Phase 3) → Regelmäßige Sync-Checks & Auto-Retries
|
||||
|
||||
Die vollständige Synchronisations-Pipeline ist nun einsatzbereit!
|
||||
|
||||
## Notes
|
||||
- Old system was Node.js + Python hybrid (Python steps as child processes)
|
||||
|
||||
Reference in New Issue
Block a user