Fixed dispatcher and registry
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import importlib
|
||||
from lifecyclemanager import manageLifecycle
|
||||
from dispatchstate import buildState
|
||||
|
||||
def buildDispatch(request):
|
||||
dispatch = []
|
||||
|
||||
for key in request["module"]:
|
||||
dispatch.append(request["module"][key])
|
||||
|
||||
resolveddispatch = "plugins."+ ".".join(dispatch)
|
||||
|
||||
module = importlib.import_module(resolveddispatch)
|
||||
|
||||
mode = request.get("mode", "oneshot")
|
||||
|
||||
return module, mode
|
||||
Reference in New Issue
Block a user