mirror of
https://github.com/krateng/maloja.git
synced 2025-08-07 09:01:26 -04:00
Switched to explicit server execution
This commit is contained in:
parent
a598ba96de
commit
04947cb97d
@ -10,6 +10,7 @@ from .setup import setup
|
|||||||
from . import tasks
|
from . import tasks
|
||||||
from .. import __pkginfo__ as info
|
from .. import __pkginfo__ as info
|
||||||
from .. import globalconf
|
from .. import globalconf
|
||||||
|
from .. import server
|
||||||
|
|
||||||
|
|
||||||
def print_header_info():
|
def print_header_info():
|
||||||
@ -87,7 +88,7 @@ def onlysetup():
|
|||||||
def direct():
|
def direct():
|
||||||
print_header_info()
|
print_header_info()
|
||||||
setup()
|
setup()
|
||||||
from .. import server
|
server.run_server()
|
||||||
|
|
||||||
def debug():
|
def debug():
|
||||||
os.environ["MALOJA_DEV_MODE"] = 'true'
|
os.environ["MALOJA_DEV_MODE"] = 'true'
|
||||||
|
@ -14,17 +14,10 @@ from .control import getInstance
|
|||||||
|
|
||||||
setproctitle.setproctitle("maloja_supervisor")
|
setproctitle.setproctitle("maloja_supervisor")
|
||||||
|
|
||||||
def update():
|
|
||||||
log("Updating...",module="supervisor")
|
|
||||||
try:
|
|
||||||
os.system("pip3 install maloja --upgrade --no-cache-dir")
|
|
||||||
except:
|
|
||||||
log("Could not update.",module="supervisor")
|
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
try:
|
try:
|
||||||
return subprocess.Popen(
|
return subprocess.Popen(
|
||||||
["python3", "-m", "maloja.server"],
|
["python3", "-m", "maloja","run"],
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
|
@ -310,7 +310,3 @@ def run_server():
|
|||||||
except OSError:
|
except OSError:
|
||||||
log("Error. Is another Maloja process already running?")
|
log("Error. Is another Maloja process already running?")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
run_server()
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user