mirror of
https://github.com/yweber/lodel2.git
synced 2026-06-28 04:10:48 +02:00
To start in standalone uwsgi set lodel2.webui.standalone=True in conf file and start loader.py
15 lines
476 B
Python
15 lines
476 B
Python
#-*- coding: utf-8 -*-
|
|
|
|
import os
|
|
from lodel.plugin import LodelHook
|
|
from lodel.settings import Settings
|
|
|
|
##@brief uwsgi startup demo
|
|
@LodelHook('lodel2_loader_main')
|
|
def uwsgi_fork(hook_name, caller, payload):
|
|
if Settings.webui.standalone:
|
|
cmd='uwsgi_python3 --http-socket {addr}:{port} --module run'
|
|
cmd.format(
|
|
addr = Settings.webui.listen_address,
|
|
port = Settings.webui.listen_port)
|
|
exit(os.system(cmd))
|