import psycopg2 def get_connection(): try: # Konfigurasi koneksi database # connection = psycopg2.connect( # host="localhost", # port=5432, # database="postgres", # user="postgres", # password="ariwa" # ) connection = psycopg2.connect( dbname="digital_twin", user="postgres", password="postgres", host="192.168.1.85", port="5432", ) connection_wo_db = psycopg2.connect( dbname="digital_twin", user="postgres", password="postgres", host="192.168.1.86", port="5432", ) return connection, connection_wo_db except Exception as e: print("Error saat koneksi ke database:", e) return None