Skip to content

Commit cfb5ade

Browse files
Separation of backend services (#933)
* Refactor sync-microservice and backend service configurations - Updated SYNC_MICROSERVICE_URL in settings.py files to remove redundant API versioning. - Removed microservice utility functions from main.py and adjusted router configurations. - Enhanced setup scripts for sync-microservice with Python 3.12 compatibility. - Improved documentation for sync-microservice setup and troubleshooting. - Cleaned up server utility functions to streamline service start processes. - Adjusted API routes in sync-microservice for better organization and clarity.
1 parent ae22322 commit cfb5ade

22 files changed

Lines changed: 252 additions & 513 deletions

File tree

backend/app/config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
MODEL_EXPORTS_PATH = "app/models/ONNX_Exports"
33

44
# Microservice URLs
5-
SYNC_MICROSERVICE_URL = "http://localhost:8001/api/v1"
5+
SYNC_MICROSERVICE_URL = "http://localhost:8001"
66

77
CONFIDENCE_PERCENT = 0.6
88
# Object Detection Models:

backend/app/utils/microservice.py

Lines changed: 0 additions & 363 deletions
This file was deleted.

backend/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from app.database.albums import db_create_album_images_table
2020
from app.database.folders import db_create_folders_table
2121
from app.database.metadata import db_create_metadata_table
22-
from app.utils.microservice import microservice_util_start_sync_service
2322

2423
from app.routes.folders import router as folders_router
2524
from app.routes.albums import router as albums_router
@@ -52,7 +51,6 @@ async def lifespan(app: FastAPI):
5251
db_create_albums_table()
5352
db_create_album_images_table()
5453
db_create_metadata_table()
55-
microservice_util_start_sync_service()
5654
# Create ProcessPoolExecutor and attach it to app.state
5755
app.state.executor = ProcessPoolExecutor(max_workers=1)
5856

0 commit comments

Comments
 (0)