forked from nathanwoodburn/firewalletbrowser
fix: Don't import gunicorn unless specified by args
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,3 +14,5 @@ plugins/signatures.json
|
||||
user_data/
|
||||
customPlugins/
|
||||
cache/
|
||||
build/
|
||||
dist/
|
||||
|
||||
@@ -3,11 +3,13 @@ import sys
|
||||
import platform
|
||||
from main import app
|
||||
from waitress import serve
|
||||
from gunicorn.app.base import BaseApplication
|
||||
|
||||
|
||||
threads = 4
|
||||
|
||||
class GunicornApp(BaseApplication):
|
||||
def gunicornServer():
|
||||
from gunicorn.app.base import BaseApplication
|
||||
class GunicornApp(BaseApplication):
|
||||
def __init__(self, app, options=None):
|
||||
self.options = options or {}
|
||||
self.application = app
|
||||
@@ -20,9 +22,6 @@ class GunicornApp(BaseApplication):
|
||||
|
||||
def load(self):
|
||||
return self.application
|
||||
|
||||
|
||||
def gunicornServer():
|
||||
options = {
|
||||
'bind': '0.0.0.0:5000',
|
||||
'workers': 2,
|
||||
|
||||
Reference in New Issue
Block a user