Skip to content

Commit

Permalink
use treads instead of processes? Maybe this prevents autokill?
Browse files Browse the repository at this point in the history
  • Loading branch information
KastanDay committed Sep 15, 2023
1 parent 09010b5 commit 446600f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ai_ta_backend/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gc
import os
import time
from concurrent.futures import wait
from typing import List

from dotenv import load_dotenv
Expand All @@ -16,7 +17,8 @@
app = Flask(__name__)
CORS(app)
executor = Executor(app)
# app.config['EXECUTOR_MAX_WORKERS'] = 5 nothing == picks defaults for me
app.config['EXECUTOR_TYPE'] = 'thread' # thread is default, or 'process'
app.config['EXECUTOR_MAX_WORKERS'] = 5

# load API keys from globally-availabe .env file
load_dotenv()
Expand Down

0 comments on commit 446600f

Please sign in to comment.