Skip to content

Commit

Permalink
Add action timeout (#575) (#579)
Browse files Browse the repository at this point in the history
(cherry picked from commit 070638c)

Co-authored-by: Aleksandr Maus <[email protected]>
  • Loading branch information
mergify[bot] and aleksmaus authored Jul 21, 2021
1 parent 20f6377 commit 74db288
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/fleet/handleCheckin.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ func convertActions(agentId string, actions []model.Action) ([]ActionResp, strin
Id: action.ActionId,
Type: action.Type,
InputType: action.InputType,
Timeout: action.Timeout,
})
}

Expand Down
1 change: 1 addition & 0 deletions cmd/fleet/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ type ActionResp struct {
Id string `json:"id"`
Type string `json:"type"`
InputType string `json:"input_type"`
Timeout int64 `json:"timeout,omitempty"`
}

type Event struct {
Expand Down
3 changes: 3 additions & 0 deletions internal/pkg/es/mapping.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions internal/pkg/model/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions model/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"description": "The input type the actions should be routed to.",
"type": "string"
},
"timeout": {
"description": "The optional action timeout in seconds",
"type": "integer"
},
"user_id": {
"description": "The ID of the user who created the action.",
"type": "string"
Expand Down

0 comments on commit 74db288

Please sign in to comment.