Files
upstream-corteza/server/app/options/wait_for.cue
upstream-mirror 7e385fc126
Some checks failed
SonarQube / SonarQube (push) Failing after 5m28s
E2e test on main branch push / server and client test (map[name:admin port:8080]) (push) Failing after 3m33s
Server and lib tests / Library test (js) (push) Failing after 1m36s
Server and lib tests / Library test (vue) (push) Successful in 2m24s
Server and lib tests / Web client test (admin) (push) Successful in 2m52s
Server and lib tests / Web client test (compose) (push) Successful in 3m23s
Server and lib tests / Web client test (discovery) (push) Successful in 2m49s
Server and lib tests / Web client test (one) (push) Successful in 2m52s
Server and lib tests / Web client test (privacy) (push) Successful in 2m44s
Server and lib tests / Web client test (reporter) (push) Successful in 2m56s
Server and lib tests / Web client test (workflow) (push) Successful in 3m0s
Server and lib tests / Server tests (push) Failing after 4m55s
E2e test on main branch push / notify-failure (push) Failing after 9s
Server and lib tests / Send matrix testing notification (push) Successful in 2s
Mark stale issues and pull requests / stale (push) Successful in 40s
snapshot of https://github.com/cortezaproject/corteza.git (2024.9.x, 2026-09-18; blobs > 131072B omitted)
2026-09-18 01:22:23 +05:00

77 lines
1.8 KiB
CUE

package options
import (
"github.com/cortezaproject/corteza/server/codegen/schema"
)
waitFor: schema.#optionsGroup & {
handle: "wait-for"
imports: [
"\"time\"",
]
title: "Delay system startup"
intro: """
You can configure these options to defer API execution until another external (HTTP) service is up and running.
[ TIP ]
====
Delaying API execution can come in handy in complex setups where execution order is important.
====
"""
options: {
delay: {
type: "time.Duration"
description: """
Delays API startup for the amount of time specified (10s, 2m...).
This delay happens before service (`WAIT_FOR_SERVICES`) probing.
"""
env: "WAIT_FOR"
}
status_page: {
type: "bool"
defaultGoExpr: "true"
description: "Show temporary status web page."
env: "WAIT_FOR_STATUS_PAGE"
}
services: {
description: """
Space delimited list of hosts and/or URLs to probe.
Host format: `host` or `host:443` (port will default to 80).
[NOTE]
====
Services are probed in parallel.
====
"""
env: "WAIT_FOR_SERVICES"
}
services_timeout: {
type: "time.Duration"
defaultGoExpr: "time.Minute"
defaultValue: "1m"
description: "Max time for each service probe."
env: "WAIT_FOR_SERVICES_TIMEOUT"
}
services_probe_timeout: {
type: "time.Duration"
defaultGoExpr: "time.Second * 30"
defaultValue: "30s"
description: "Timeout for each service probe."
env: "WAIT_FOR_SERVICES_PROBE_TIMEOUT"
}
services_probe_interval: {
type: "time.Duration"
defaultGoExpr: "time.Second * 5"
defaultValue: "5s"
description: "Interval between service probes."
env: "WAIT_FOR_SERVICES_PROBE_INTERVAL"
}
}
}