This repository was archived by the owner on Nov 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -165,26 +165,26 @@ class InstanceControlSubsystem {
165165 // logger.info(`执行计划任务: ${task.name} ${task.action} ${task.time} ${task.count} `);
166166 if ( task . action === "start" ) {
167167 if ( instanceStatus === 0 ) {
168- instance . exec ( new StartCommand ( "ScheduleJob" ) ) ;
168+ return await instance . exec ( new StartCommand ( "ScheduleJob" ) ) ;
169169 }
170170 }
171171 if ( task . action === "stop" ) {
172172 if ( instanceStatus === 3 ) {
173- instance . exec ( new StopCommand ( ) ) ;
173+ return await instance . exec ( new StopCommand ( ) ) ;
174174 }
175175 }
176176 if ( task . action === "restart" ) {
177177 if ( instanceStatus === 3 ) {
178- instance . exec ( new RestartCommand ( ) ) ;
178+ return await instance . exec ( new RestartCommand ( ) ) ;
179179 }
180180 }
181181 if ( task . action === "command" ) {
182182 if ( instanceStatus === 3 ) {
183- instance . exec ( new SendCommand ( payload ) ) ;
183+ return await instance . exec ( new SendCommand ( payload ) ) ;
184184 }
185185 }
186186 if ( task . action === "kill" ) {
187- instance . exec ( new KillCommand ( ) ) ;
187+ return await instance . exec ( new KillCommand ( ) ) ;
188188 }
189189 } catch ( error ) {
190190 logger . error ( `实例 ${ task . instanceUuid } 计划任务 ${ task . name } 执行错误: \n ${ error } ` ) ;
You can’t perform that action at this time.
0 commit comments