diff --git a/src/api/Dockerfile b/src/api/Dockerfile index cf4e0f8..adc007a 100644 --- a/src/api/Dockerfile +++ b/src/api/Dockerfile @@ -19,4 +19,4 @@ COPY . . EXPOSE 8080 -CMD [ "waitress-serve", "--port=8080", "--call", "api:create_app"] +CMD [ "waitress-serve", "--port=8080", "--threads=16", "--call", "api:create_app"] \ No newline at end of file diff --git a/src/api/api.py b/src/api/api.py index d0d8e50..f75b05b 100644 --- a/src/api/api.py +++ b/src/api/api.py @@ -229,7 +229,7 @@ scheduler.get_job('core_api_sync').modify(next_run_time=datetime.now()) # Start the scheduler scheduler.start() -## Flask +### Flask ### # Frontend @app.route('/', methods=['GET']) def root_route(): @@ -246,7 +246,7 @@ def root_route(): thumbnails = [file for file in os.listdir(f'{rec_path}/thumb/') if file.endswith('.png')] return render_template('index.html', now=datetime.utcnow(), video_files=video_files, thumbnails=sorted_thumbnails) -# API +# JSON Data @app.route('/playhead', methods=['GET']) def playhead_route(): global playhead