-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 新增文件读取接口 * 支持任务手动下发和状态回显及日志回显 * 对接juno任务下发和执行
- Loading branch information
Showing
18 changed files
with
360 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package job | ||
|
||
import "syscall" | ||
|
||
func makeCmdAttr() *syscall.SysProcAttr { | ||
return &syscall.SysProcAttr{ | ||
Setpgid: true, | ||
} | ||
} | ||
|
||
func killProcess(pid int) error { | ||
return syscall.Kill(-pid, syscall.SIGKILL) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package job | ||
|
||
import ( | ||
"os/exec" | ||
"strconv" | ||
"syscall" | ||
) | ||
|
||
func makeCmdAttr() *syscall.SysProcAttr { | ||
return &syscall.SysProcAttr{} | ||
} | ||
|
||
func killProcess(pid int) error { | ||
return exec.Command("taskkill", "/T", "/F", "/PID", strconv.Itoa(pid)).Run() | ||
} | ||
|
Oops, something went wrong.