|
|
|
|
@ -14,13 +14,13 @@ load_dotenv()
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
|
|
# Database configuration
|
|
|
|
|
DB_HOST_1 = "192.168.1.85" # For tables: pf_parts, ms_equipment_master
|
|
|
|
|
DB_HOST_2 = "192.168.1.86" # For table: dl_pi_fetch_last
|
|
|
|
|
DB_PORT = "5432"
|
|
|
|
|
DB_USER = "postgres"
|
|
|
|
|
DB_PASS = "postgres"
|
|
|
|
|
DB_NAME = "digital_twin"
|
|
|
|
|
# Database configuration from environment variables
|
|
|
|
|
DB_HOST_1 = os.getenv("DB_HOST_1") # For tables: pf_parts, ms_equipment_master
|
|
|
|
|
DB_HOST_2 = os.getenv("DB_HOST_2") # For table: dl_pi_fetch_last
|
|
|
|
|
DB_PORT = os.getenv("DB_PORT")
|
|
|
|
|
DB_USER = os.getenv("DB_USER")
|
|
|
|
|
DB_PASS = os.getenv("DB_PASS")
|
|
|
|
|
DB_NAME = os.getenv("DB_NAME")
|
|
|
|
|
|
|
|
|
|
def chunked_iterable(iterable, size):
|
|
|
|
|
"""Helper to split list into chunks"""
|
|
|
|
|
|