Migrate coordinator-api scripts to centralized aitbc package utilities
- Migrate scripts/migrate_to_postgresql.py hardcoded path to use DATA_DIR - Migrate scripts/migrate_complete.py hardcoded path to use DATA_DIR
This commit is contained in:
@@ -5,6 +5,8 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from aitbc.constants import DATA_DIR
|
||||||
|
|
||||||
# Add the src directory to the path
|
# Add the src directory to the path
|
||||||
sys.path.insert(0, str(Path(__file__).parent / "src"))
|
sys.path.insert(0, str(Path(__file__).parent / "src"))
|
||||||
|
|
||||||
@@ -16,7 +18,7 @@ from decimal import Decimal
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
# Database configurations
|
# Database configurations
|
||||||
SQLITE_DB = "/var/lib/aitbc/data/coordinator.db"
|
SQLITE_DB = str(DATA_DIR / "data/coordinator.db")
|
||||||
PG_CONFIG = {
|
PG_CONFIG = {
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"database": "aitbc_coordinator",
|
"database": "aitbc_coordinator",
|
||||||
|
|||||||
Reference in New Issue
Block a user