Skip to content

Commit b03b719

Browse files
author
example
committed
Merge branch 'main' of github:tummyslyunopened/kneecap-transcribe
2 parents 229947c + d3ca385 commit b03b719

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def get_db_connection():
2323
return conn
2424

2525
def init_db():
26+
conn = get_db_connection()
27+
c = conn.cursor()
2628
conn = get_db_connection()
2729
c = conn.cursor()
2830
c = conn.cursor()
@@ -48,6 +50,7 @@ def init_db():
4850
def process_job(job_id):
4951
# Create app context for the thread
5052
with app.app_context():
53+
conn = get_db_connection()
5154
conn = get_db_connection()
5255
c = conn.cursor()
5356

@@ -165,6 +168,7 @@ def start_transcription():
165168

166169
@app.route("/status/<job_id>", methods=["GET"])
167170
def get_job_status(job_id):
171+
conn = get_db_connection()
168172
conn = get_db_connection()
169173
c = conn.cursor()
170174

0 commit comments

Comments
 (0)