18 lines
408 B
Python
18 lines
408 B
Python
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
|