You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.4 KiB
48 lines
2.4 KiB
4 years ago
|
import psutil, datetime, logging, os, sys # stdout from logging
|
||
|
|
||
|
# Config settings
|
||
|
lPyOpenRPASourceFolderPathStr = r"..\Sources" # Path for test pyOpenRPA package
|
||
|
|
||
|
# INFO Relative/Absolute import see below - after settings init
|
||
|
|
||
|
# Template for import CP - Control Panels
|
||
|
# ATTENTION - Pay attention to CP names! Orchestrator is one for the all control panels per one machine
|
||
|
|
||
|
## !!! For Absolute import !!!
|
||
|
# sys.path.insert(0,os.path.abspath(os.path.join(r"..\ROBOT\Builds")))
|
||
|
# import pyRobot_CP
|
||
|
# pyRobot_CP.SettingsUpdate(inGSettings=gSettings)
|
||
|
|
||
|
## !!! For Relative import !!!
|
||
|
# sys.path.insert(0,os.path.abspath(os.path.join(r"..\ROBOT\Builds")))
|
||
|
# from pyRobot_CP import ControlPanel
|
||
|
# ControlPanel.SettingsUpdate(inGSettings=gSettings)
|
||
|
|
||
|
# Operations
|
||
|
if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.path.join(lPyOpenRPASourceFolderPathStr))) # Path for test pyOpenRPA package
|
||
|
# Start import after config the pyOpenRPA folder
|
||
|
from pyOpenRPA.Orchestrator import SettingsTemplate # Import functionallity
|
||
|
|
||
|
if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orchestrator
|
||
|
from pyOpenRPA.Orchestrator import Orchestrator # Import orchestrator main
|
||
|
gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration
|
||
|
|
||
|
# TEST Add User ND - Add Login ND to superuser of the Orchestrator
|
||
|
Orchestrator.OrchestratorAccessUserUpdate(inGSettings=gSettings, inADLoginStr="ND", inADStr="", inADIsDefaultBool=True, inURLList=[],inCPAllowKeyList=[])
|
||
|
# TEST Add User IMaslov - Add Login IMaslov to superuser of the Orchestrator
|
||
|
Orchestrator.OrchestratorAccessUserUpdate(inGSettings=gSettings, inADLoginStr="IMaslov", inADStr="", inADIsDefaultBool=True, inURLList=[],inCPAllowKeyList=[])
|
||
|
# TEST Add Supertoken for the all access between robots
|
||
|
Orchestrator.OrchestratorAccessSuperTokenAdd(inGSettings=gSettings, inSuperTokenStr="1992-04-03-0643-ru-b4ff-openrpa52zzz")
|
||
|
|
||
|
## !!! For Relative import !!! CP Version Check
|
||
|
sys.path.insert(0,os.path.abspath(os.path.join(r"")))
|
||
|
from ControlPanel import CP_VersionCheck
|
||
|
CP_VersionCheck.SettingsUpdate(inGSettings=gSettings)
|
||
|
|
||
|
# Call the orchestrator def
|
||
|
Orchestrator.Orchestrator(inGSettings=gSettings)
|
||
|
|
||
|
else:
|
||
|
print("!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)")
|
||
|
|