publish / publish (push) Successful in 1m6s
Each template the operator declares becomes an action with the effect declared for it, so judgement decides on the declaration. A launch carries Archie's idempotency key in the task message; invoking again finds that task instead of launching another, so a resumed run never launches twice. A task that ends in error is a known failure; one still running at the deadline is unknown.
15 lines
557 B
Go
15 lines
557 B
Go
// Command semaphore is the Semaphore connector: each job template an operator
|
|
// declares becomes one action, with the effect the operator declares for it,
|
|
// so judgement decides on the template's effect rather than on its name. A
|
|
// launch carries Archie's idempotency key, so a resumed run finds the task it
|
|
// already started instead of launching another.
|
|
package main
|
|
|
|
import "github.com/samcharles93/archipelago/sdk/connector"
|
|
|
|
func main() {
|
|
connector.Serve(func(cfg connector.Config) (connector.Connector, error) {
|
|
return newSemaphore(cfg)
|
|
})
|
|
}
|