this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

spindle: parse `time.Duration` when parsing spindle config

Signed-off-by: Seongmin Lee <git@boltless.me>

+4 -10
+3 -2
spindle/config/config.go
··· 4 4 "context" 5 5 "fmt" 6 6 "path/filepath" 7 + "time" 7 8 8 9 "github.com/bluesky-social/indigo/atproto/syntax" 9 10 "github.com/sethvargo/go-envconfig" ··· 48 49 } 49 50 50 51 type NixeryPipelines struct { 51 - Nixery string `env:"NIXERY, default=nixery.tangled.sh"` 52 - WorkflowTimeout string `env:"WORKFLOW_TIMEOUT, default=5m"` 52 + Nixery string `env:"NIXERY, default=nixery.tangled.sh"` 53 + WorkflowTimeout time.Duration `env:"WORKFLOW_TIMEOUT, default=5m"` 53 54 } 54 55 55 56 type Config struct {
+1 -8
spindle/engines/nixery/engine.go
··· 122 122 } 123 123 124 124 func (e *Engine) WorkflowTimeout() time.Duration { 125 - workflowTimeoutStr := e.cfg.NixeryPipelines.WorkflowTimeout 126 - workflowTimeout, err := time.ParseDuration(workflowTimeoutStr) 127 - if err != nil { 128 - e.l.Error("failed to parse workflow timeout", "error", err, "timeout", workflowTimeoutStr) 129 - workflowTimeout = 5 * time.Minute 130 - } 131 - 132 - return workflowTimeout 125 + return e.cfg.NixeryPipelines.WorkflowTimeout 133 126 } 134 127 135 128 func workflowImage(deps map[string][]string, nixery string) string {