pub struct Config {Show 26 fields
pub dags: DagsSection,
pub scripts: ScriptsSection,
pub interpreters: BTreeMap<String, Interpreter>,
pub log: LogSection,
pub ops: OpsSection,
pub database: DatabaseSection,
pub master: MasterSection,
pub mapping: MappingSection,
pub backfill: BackfillSection,
pub webserver: WebserverSection,
pub ui: UiSection,
pub worker: WorkerSection,
pub watchers: WatchersSection,
pub sensors: SensorsSection,
pub triggers: TriggersSection,
pub grpc: GrpcSection,
pub events: EventsSection,
pub notifications: NotificationsSection,
pub retention: RetentionSection,
pub tls: TlsSection,
pub secret_storage: SecretStorageSection,
pub dag_roots: Vec<Root>,
pub script_roots: Vec<Root>,
pub builtin_python: Option<String>,
pub timings: Timings,
pub limits: HiddenLimits,
}Expand description
The whole configuration, after loading and validation.
Fields§
§dags: DagsSection[dags]: where DAG files are and how they are parsed.
scripts: ScriptsSection[scripts]: where plain scripts are.
interpreters: BTreeMap<String, Interpreter>[interpreters]: interpreter names and their executables.
log: LogSection[log]: schedr’s own logs.
ops: OpsSection[ops]: the ops port (health and metrics).
database: DatabaseSection[database]: the state database.
master: MasterSection[master]: the master’s port and timing.
mapping: MappingSection[mapping]: mapped tasks (.expand()).
backfill: BackfillSection[backfill]: backfills (schedr runs backfill).
webserver: WebserverSection[webserver]: the REST API (and later the UI).
ui: UiSection[ui]: the web UI (schedr ui, and the one schedr standalone serves).
worker: WorkerSection[worker]: this worker’s identity, capacity and data directory.
watchers: WatchersSection[sensors]: wait steps (@sensor, @sensor.poke).
sensors: SensorsSection[sensors].
triggers: TriggersSectionEvent triggers.
grpc: GrpcSection[grpc]: the link between the master and its workers, both ends.
events: EventsSection[events]: events posted through the API (decision 354).
notifications: NotificationsSection[notifications]: what the master sends when runs and tasks end (decisions 408-429).
retention: RetentionSection[retention]: how long the database keeps runs, outputs, events and commands
(decisions 430-435).
tls: TlsSection[tls]: mTLS on the internal links (master ↔ worker, webserver → worker logs).
secret_storage: SecretStorageSection[secret_storage]: where a worker’s tasks get their secrets (workers only).
dag_roots: Vec<Root>The DAG roots, resolved from dags.path and dags.roots when loading.
script_roots: Vec<Root>The script roots, resolved from scripts.path and scripts.roots when loading.
builtin_python: Option<String>How the python interpreter was chosen when [interpreters] doesn’t define it: set to
BUILTIN_PYTHON_ORIGIN when loading, and by the binary when it looks for a better
one (e.g. project venv); None when python is configured.
timings: TimingsThe fixed timings, as SCHEDR_HIDDEN__* left them.
limits: HiddenLimitsThe fixed limits, as SCHEDR_HIDDEN__* left them.
Implementations§
Source§impl Config
impl Config
Sourcepub const fn cleanup_room(&self) -> Duration
pub const fn cleanup_room(&self) -> Duration
The longest a cleanup’s try fits in a drain: the grace period less the drain’s terminate and report periods (25 s of the default 30 s).
Sourcepub fn cleanup_timeout(&self) -> Duration
pub fn cleanup_timeout(&self) -> Duration
[worker] cleanup_timeout, or when not set the shorter of 5 minutes and
Self::cleanup_room (B252: the defaults agree with each other), at least 1 s: a
grace period the drain takes whole leaves none, and a zero would end every cleanup at
once.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Config
Source§impl JsonSchema for Config
impl JsonSchema for Config
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);