This commit is contained in:
t0is 2025-03-21 15:31:36 +01:00
parent 3647c3964b
commit 00a4ab1683

View File

@ -93,7 +93,7 @@ def try_lock_video(db, video_id):
""" """
cursor.execute(query, (video_id,)) cursor.execute(query, (video_id,))
db.commit() db.commit()
affected = cursor.rowcount affected = cursor.affected_rows
cursor.close() cursor.close()
return affected == 1 return affected == 1
@ -104,7 +104,7 @@ def main():
# Connect to the MariaDB database using credentials from environment variables. # Connect to the MariaDB database using credentials from environment variables.
try: try:
db = mariadb.connect( db = mariadb.connect(
host=os.environ.get("DB_HOST", "mariadb"), host=os.environ.get("DB_HOST", "192.168.0.187"),
user=os.environ.get("DB_USER", "t0is"), user=os.environ.get("DB_USER", "t0is"),
password=os.environ.get("DB_PASS", "Silenceisgolden555"), password=os.environ.get("DB_PASS", "Silenceisgolden555"),
database=os.environ.get("DB_NAME", "transcriptor"), database=os.environ.get("DB_NAME", "transcriptor"),