(script_id int)
| 402 | } |
| 403 | |
| 404 | func (this *db) GetScript(script_id int) *types.Script { |
| 405 | script := types.Script{} |
| 406 | if err := this.Get(&script, "SELECT * FROM `scripts` WHERE `id` = ?", script_id); err != nil { |
| 407 | lg.Error(err.Error()) |
| 408 | return nil |
| 409 | } |
| 410 | return &script |
| 411 | } |
| 412 | |
| 413 | func (this *db) DeleteStrategyFailed(strategy_id int, host_id string) error { |
| 414 | _, err := this.Exec("DELETE FROM strategy_event_failed WHERE strategy_id = ? AND host_id = ?", strategy_id, host_id) |