|  | @@ -36,6 +36,9 @@ function getApp(key) {
 | 
	
		
			
				|  |  |      let app = {
 | 
	
		
			
				|  |  |          id: -1,
 | 
	
		
			
				|  |  |          port: -1,
 | 
	
		
			
				|  |  | +        path:"",
 | 
	
		
			
				|  |  | +        programName:"",
 | 
	
		
			
				|  |  | +        strategyName:"",
 | 
	
		
			
				|  |  |          childProcess: undefined,
 | 
	
		
			
				|  |  |          nowBalance: -1,
 | 
	
		
			
				|  |  |          messlist: [],
 | 
	
	
		
			
				|  | @@ -44,6 +47,8 @@ function getApp(key) {
 | 
	
		
			
				|  |  |          threadStartTime: -1,
 | 
	
		
			
				|  |  |          status: 0,
 | 
	
		
			
				|  |  |          restartStatus: 0,
 | 
	
		
			
				|  |  | +        closeTime:0,
 | 
	
		
			
				|  |  | +        isClearance:false,
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      // logger.info(appMap, appMap.has(key));
 | 
	
	
		
			
				|  | @@ -81,6 +86,10 @@ async function run(param) {
 | 
	
		
			
				|  |  |          app.threadStatus = RobotStatus.START_PENDING
 | 
	
		
			
				|  |  |          app.id = key
 | 
	
		
			
				|  |  |          app.port = param.callPort
 | 
	
		
			
				|  |  | +        app.path = param.path
 | 
	
		
			
				|  |  | +        app.programName = param.programName
 | 
	
		
			
				|  |  | +        app.strategyName = param.strategyName
 | 
	
		
			
				|  |  | +        app.isClearance = false
 | 
	
		
			
				|  |  |          robotStatus(app)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /****
 | 
	
	
		
			
				|  | @@ -259,6 +268,7 @@ async function run(param) {
 | 
	
		
			
				|  |  |              robotStatus(app)
 | 
	
		
			
				|  |  |              app.childProcess = undefined
 | 
	
		
			
				|  |  |              app.status = 0
 | 
	
		
			
				|  |  | +            app.closeTime = new Date().getTime()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |          app.childProcess.on('exit', (code, signal) => {
 | 
	
		
			
				|  |  |              logger.info(`子进程退出-exit,退出码: ${code}, 信号: ${signal}`);
 | 
	
	
		
			
				|  | @@ -266,6 +276,7 @@ async function run(param) {
 | 
	
		
			
				|  |  |              robotStatus(app)
 | 
	
		
			
				|  |  |              app.childProcess = undefined
 | 
	
		
			
				|  |  |              app.status = 0
 | 
	
		
			
				|  |  | +            app.closeTime = new Date().getTime()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          app.childProcess.on('close', (code) => {
 | 
	
	
		
			
				|  | @@ -274,6 +285,7 @@ async function run(param) {
 | 
	
		
			
				|  |  |              robotStatus(app)
 | 
	
		
			
				|  |  |              app.childProcess = undefined
 | 
	
		
			
				|  |  |              app.status = 0
 | 
	
		
			
				|  |  | +            app.closeTime = new Date().getTime()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |          app.threadStatus = RobotStatus.RUNNING
 | 
	
		
			
				|  |  |          robotStatus(app)
 | 
	
	
		
			
				|  | @@ -301,6 +313,7 @@ async function closeApp(param) {
 | 
	
		
			
				|  |  |                  logger.info(`进程${pid} 杀死成功`);
 | 
	
		
			
				|  |  |                  logger.info(`当前app:`, app);
 | 
	
		
			
				|  |  |                  app.threadStatus = RobotStatus.STOP_PENDING
 | 
	
		
			
				|  |  | +                app.isClearance = false
 | 
	
		
			
				|  |  |                  robotStatus(app)
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -343,7 +356,7 @@ async function searchPositions(param) {
 | 
	
		
			
				|  |  |          // {"id":"375","callPort":"1111","path":"80654e330ed67df2880231a67925e984as-rust","programName":"v3.3.2_clear","strategyName":"as","checkId":"467"}
 | 
	
		
			
				|  |  |          var key = param.id
 | 
	
		
			
				|  |  |          var appName = param.path
 | 
	
		
			
				|  |  | -        var checkId = param.checkId
 | 
	
		
			
				|  |  | +        var r_id = param.id
 | 
	
		
			
				|  |  |          let newAppName = "4l_as_" + appName;
 | 
	
		
			
				|  |  |          let configName = "config.json";        //配置文件
 | 
	
		
			
				|  |  |          var programName = param.programName
 | 
	
	
		
			
				|  | @@ -362,7 +375,7 @@ async function searchPositions(param) {
 | 
	
		
			
				|  |  |          const asName = appPath + "/" + newAppName
 | 
	
		
			
				|  |  |          const configPath = appPath + "/" + configName
 | 
	
		
			
				|  |  |          const appPort = param.callPort
 | 
	
		
			
				|  |  | -        const command = `sudo ${asName} --config=${configPath} --port=${appPort} --run_mode=1 --check_id=${checkId}`
 | 
	
		
			
				|  |  | +        const command = `sudo ${asName} --config=${configPath} --port=${appPort} --run_mode=1 --r_id=${r_id}`
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          exec(command, (error, stdout, stderr) => {
 | 
	
		
			
				|  |  |              if (error) {
 |