mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix multiprocessing
+ remove global locks
This commit is contained in:
@@ -6,9 +6,10 @@ import logging
|
||||
import os
|
||||
import psutil
|
||||
import waitress
|
||||
import bjoern
|
||||
# import bjoern
|
||||
import mimetypes
|
||||
import setproctitle
|
||||
import multiprocessing
|
||||
|
||||
from flask_jwt_extended import (
|
||||
create_access_token,
|
||||
@@ -229,6 +230,7 @@ def print_memory_usage(response: Response):
|
||||
return response
|
||||
|
||||
if __name__ == "__main__":
|
||||
multiprocessing.freeze_support()
|
||||
load_into_mem()
|
||||
run_swingmusic()
|
||||
# TrackStore.export()
|
||||
@@ -237,13 +239,13 @@ if __name__ == "__main__":
|
||||
host = FLASKVARS.get_flask_host()
|
||||
port = FLASKVARS.get_flask_port()
|
||||
|
||||
# waitress.serve(
|
||||
# app,
|
||||
# host=host,
|
||||
# port=port,
|
||||
# threads=100,
|
||||
# ipv6=True,
|
||||
# ipv4=True,
|
||||
# )
|
||||
waitress.serve(
|
||||
app,
|
||||
host=host,
|
||||
port=port,
|
||||
threads=100,
|
||||
ipv6=True,
|
||||
ipv4=True,
|
||||
)
|
||||
# app.run(host=host, port=port, debug=False)
|
||||
bjoern.run(app, host, port)
|
||||
# bjoern.run(app, host, port)
|
||||
|
||||
Reference in New Issue
Block a user