#2 Flatten priority (load levels): run only one job at a time #3

Open
daniel wants to merge 7 commits from feature/#2-flatten-priority-load-levels into develop
pull from: feature/#2-flatten-priority-load-levels
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 3a4c4fa326 - Show all commits

No files matched your search

+3
View File
@@ -78,6 +78,9 @@ pub const Context = struct {
for (self.config_deprecations.items) |w| {
self.stderr.print("warning: {s}\n", .{w}) catch {};
}
// The daemon's stderr is a buffered writer over logs/zag.log; flush so the
// warnings reach the log at startup, not on process exit.
if (self.config_deprecations.items.len > 0) self.stderr.flush() catch {};
} else |err| {
self.config_error = err;
}
+4 -1
View File
@@ -62,9 +62,12 @@ contains "install --show prints files" "zag.conf" "$(Z config install --show)"
# --- daemon -----------------------------------------------------------------------------
Z run echo hi >/dev/null 2>&1; [[ $? -eq 1 ]] && pass "run without service exits 1" || fail "run without service exits 1"
contains "service start" "Zag service started" "$(Z service start)"
# The daemon starts with the deprecated config: the removed settings must be ignored
# (effective config is the defaults) and its log must warn about them while it is running.
contains "service start" "Zag service started" "$("$ZAG" --barn-dir "$DIR" --config "$DIR/deprecated.conf" service start 2>&1)"
contains "second start refused" "already running" "$(Z service start 2>&1)"
contains "service status running" "running" "$(Z service status)"
contains "daemon log warns on deprecated settings at startup" "deprecated" "$(cat "$DIR/logs/zag.log" 2>/dev/null)"
out=$(Z run -o json -t svc sh -c 'echo from-daemon')
sid=$(json_field id "$out")