mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-26 17:49:15 +01:00
feat: enhance task runner with task status updates and process command execution
- Added a task status update to 'processing' at the start of the Run method in runner.go, improving task tracking. - Removed redundant task status update from the end of the Run method to streamline the execution flow. - Updated command execution in process.go to use 'bash' instead of 'sh' for better compatibility across environments.
This commit is contained in:
@@ -16,7 +16,7 @@ func BuildCmd(cmdStr string) (cmd *exec.Cmd, err error) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return exec.Command("cmd", "/C", cmdStr), nil
|
||||
}
|
||||
return exec.Command("sh", "-c", cmdStr), nil
|
||||
return exec.Command("bash", "-c", cmdStr), nil
|
||||
}
|
||||
|
||||
func ProcessIdExists(pid int) (exists bool) {
|
||||
|
||||
Reference in New Issue
Block a user