Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ linters:
- funlen
- maintidx
- containedctx
- mnd
- contextcheck
- err113
linters-settings:
goimports:
local-prefixes: github.com/diagridio
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ func main() {
TriggerFn: func(context.Context, *api.TriggerRequest) bool {
// Do something with your trigger here.
// Return true if the trigger was successful, false otherwise.
// Note, returning false will cause the job to be retried *immediately*.
// Note, returning false will cause the job to be retried according to
// the Jobs configurable FailurePolicy.
return true
},
})
Expand Down Expand Up @@ -70,6 +71,11 @@ A Job itself is made up of the following fields:
Optional.
- `Payload`: A protobuf Any message that can be used to store the main payload of the job which will be passed to the trigger function.
Optional.
- `FailurePolicy` Controls whether the Job should be retired if the trigger
function returns false. `Drop` doesn't retry the job, `Constant `Constant` will
constantly retry the job trigger for a configurable internal, up to a configurable
maximum number of retries (which could be infinite). By default, Jobs have a
`Constant` policy, with a 1s interval and 3 maximum retries.

A job must have *at least* either a `Schedule` or a `DueTime` set.

Expand Down
340 changes: 340 additions & 0 deletions api/failurepolicy.pb.go

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

Loading
Loading