fix make_app logic
This commit is contained in:
parent
3b248b293f
commit
772730dbcd
@ -145,15 +145,16 @@ class Isso(object):
|
|||||||
|
|
||||||
def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False):
|
def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False):
|
||||||
|
|
||||||
|
if not any((threading, multiprocessing, uwsgi)):
|
||||||
|
raise RuntimeError("either set threading, multiprocessing or uwsgi")
|
||||||
|
|
||||||
if threading:
|
if threading:
|
||||||
class App(Isso, ThreadedMixin):
|
class App(Isso, ThreadedMixin):
|
||||||
pass
|
pass
|
||||||
|
elif multiprocessing:
|
||||||
if multiprocessing:
|
|
||||||
class App(Isso, ProcessMixin):
|
class App(Isso, ProcessMixin):
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
if uwsgi:
|
|
||||||
class App(Isso, uWSGIMixin):
|
class App(Isso, uWSGIMixin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user