mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 09:37:25 +00:00
WIP
This commit is contained in:
parent
9235870792
commit
5a93456dcd
1 changed files with 9 additions and 0 deletions
|
@ -481,6 +481,15 @@ class Server:
|
|||
port=int(args.port) if args.port else int(settings.general.port),
|
||||
threads=24)
|
||||
|
||||
# Make sure that server class instance isn't getting instantiated again but reused instead.
|
||||
_instance = None
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
if not cls._instance:
|
||||
cls._instance = super(Server, cls).__new__(
|
||||
cls, *args, **kwargs)
|
||||
return cls._instance
|
||||
|
||||
@classmethod
|
||||
def start(cls):
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue