feat: complete marketplace module migration (Phase 6)

Migrates marketplace module to self-contained structure:
- Create app/modules/marketplace/services/ re-exporting from existing locations
- Create app/modules/marketplace/models/ with marketplace & letzshop models
- Create app/modules/marketplace/schemas/ with product & import schemas
- Create app/modules/marketplace/tasks/ with 5 Celery tasks:
  - process_marketplace_import - CSV product import
  - process_historical_import - Letzshop order import
  - sync_vendor_directory - Scheduled daily vendor sync
  - export_vendor_products_to_folder - Multi-language export
  - export_marketplace_products - Admin export
- Create app/modules/marketplace/exceptions.py
- Update definition.py with is_self_contained=True and scheduled_tasks

Celery task migration:
- process_marketplace_import, process_historical_import -> import_tasks.py
- sync_vendor_directory -> sync_tasks.py (scheduled daily at 02:00)
- export_vendor_products_to_folder, export_marketplace_products -> export_tasks.py

Backward compatibility:
- Legacy task files now re-export from new locations
- Remove marketplace/letzshop/export from LEGACY_TASK_MODULES

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-27 23:19:31 +01:00
parent 4f379b472b
commit eb47daec8b
15 changed files with 1088 additions and 704 deletions

View File

@@ -30,7 +30,7 @@ Transform the platform from a monolithic structure to self-contained modules whe
| `cms` | Core | ✅ **Complete** | ✅ | ✅ | - | Done |
| `payments` | Optional | 🟡 Partial | ✅ | ✅ | - | Done |
| `billing` | Optional | ✅ **Complete** | ✅ | ✅ | ✅ | Done |
| `marketplace` | Optional | 🔴 Shell | | | | Full |
| `marketplace` | Optional | **Complete** | | | | Done |
| `orders` | Optional | 🔴 Shell | ❌ | ❌ | - | Full |
| `inventory` | Optional | 🔴 Shell | ❌ | ❌ | - | Full |
| `customers` | Core | 🔴 Shell | ❌ | ❌ | - | Full |
@@ -127,6 +127,19 @@ app/tasks/celery_tasks/ # → Move to respective modules
- Created backward-compatible re-exports in `app/services/`
- Updated legacy celery_config.py to not duplicate scheduled tasks
### ✅ Phase 6: Marketplace Module Migration
- Created `app/modules/marketplace/services/` re-exporting from existing locations
- Created `app/modules/marketplace/models/` re-exporting marketplace & letzshop models
- Created `app/modules/marketplace/schemas/` re-exporting marketplace schemas
- Created `app/modules/marketplace/tasks/` with:
- `import_tasks.py` - process_marketplace_import, process_historical_import
- `sync_tasks.py` - sync_vendor_directory (scheduled daily)
- `export_tasks.py` - export_vendor_products_to_folder, export_marketplace_products
- Created `app/modules/marketplace/exceptions.py`
- Updated `definition.py` with self-contained configuration
- Updated legacy task files to re-export from new location
- Removed marketplace/letzshop/export from LEGACY_TASK_MODULES
---
## Module Migration Phases