Skip to content

Commit 76ed6d9

Browse files
authored
fix(prover): Do not exit on missing watcher data. (#3119)
## What ❔ Do not exit on missing watcher data. <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ To fix always exiting in `scaler_period` after start due to missing data. <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. ref ZKD-1855
1 parent 18ae3f9 commit 76ed6d9

File tree

1 file changed

+4
-1
lines changed
  • prover/crates/bin/prover_autoscaler/src/global

1 file changed

+4
-1
lines changed

prover/crates/bin/prover_autoscaler/src/global/scaler.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ impl Task for Scaler {
305305
let queue = self.queuer.get_queue().await.unwrap();
306306

307307
let guard = self.watcher.data.lock().await;
308-
watcher::check_is_ready(&guard.is_ready)?;
308+
if let Err(err) = watcher::check_is_ready(&guard.is_ready) {
309+
tracing::warn!("Skipping Scaler run: {}", err);
310+
return Ok(());
311+
}
309312

310313
for (ns, ppv) in &self.namespaces {
311314
let q = queue.queue.get(ppv).cloned().unwrap_or(0);

0 commit comments

Comments
 (0)