Spaces:
Runtime error
Runtime error
| title: Cuatrolabs Sync Worker Ms | |
| emoji: π’ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: docker | |
| pinned: false | |
| # SCM Sync Worker Microservice | |
| Dedicated worker service for processing MongoDB β PostgreSQL sync operations. | |
| ## Architecture | |
| ``` | |
| SCM-MS β Redis Queue β Sync-Worker-MS β PostgreSQL | |
| ``` | |
| ## Features | |
| - Processes sync operations from Redis queues | |
| - Independent scaling from SCM API | |
| - Persistent queue (survives restarts) | |
| - Retry logic with exponential backoff | |
| - Monitoring and metrics | |
| ## Queues Processed | |
| - `sync:queue:catalogues` (5 workers) | |
| - `sync:queue:employee` (3 workers) | |
| - `sync:queue:merchants` (5 workers) | |
| - `sync:queue:warehouses` (3 workers) | |
| - `sync:queue:uom` (2 workers) | |
| ## Deployment | |
| ```bash | |
| # Build | |
| docker build -t ghcr.io/mkkbms/sync-worker-ms:latest . | |
| # Deploy | |
| kubectl apply -f deployment.yaml | |
| ``` | |
| ## Environment Variables | |
| - `MONGODB_URI` - MongoDB connection string | |
| - `MONGODB_DB_NAME` - MongoDB database name | |
| - `POSTGRES_*` - PostgreSQL connection details | |
| - `REDIS_*` - Redis connection details | |
| ## Scaling | |
| Scale workers independently: | |
| ```bash | |
| kubectl scale deployment/sync-worker-ms --replicas=5 -n apps | |
| ``` | |