fixed stress,process ACTION empty (#15)

Signed-off-by: wuxiaohui <wuxiaohui94@126.com>
This commit is contained in:
wuxiaohui94 2021-01-15 17:39:46 +08:00 committed by GitHub
parent 6a475cd5fb
commit fdd2220aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -65,11 +65,13 @@ func NewProcessStopCommand() *cobra.Command {
}
func processKillCommandFunc(cmd *cobra.Command, args []string) {
pFlag.Action = core.ProcessKillAction
processAttackF(cmd, &pFlag)
}
func processStopCommandFunc(cmd *cobra.Command, args []string) {
pFlag.Signal = int(syscall.SIGSTOP)
pFlag.Action = core.ProcessStopAction
processAttackF(cmd, &pFlag)
}

View File

@ -37,6 +37,7 @@ func (s *Server) StressAttack(attack *core.StressCommand) (string, error) {
Uid: uid,
Status: core.Created,
Kind: core.StressAttack,
Action: attack.Action,
RecoverCommand: attack.String(),
}); err != nil {
return "", errors.WithStack(err)