swarm daemons exit 0 when told to stop while still waiting for the store at startup
This commit is contained in:
parent
5dd39ba88c
commit
ae37c228b1
1 changed files with 133 additions and 32 deletions
|
|
@ -75,11 +75,15 @@ async fn serve() -> Result<()> {
|
|||
cwd: std::env::temp_dir().join("review-classifier-acp-cwd"),
|
||||
},
|
||||
};
|
||||
let secret =
|
||||
swarm_secret_client::read_with_startup_retry("reading the queue client secret", || {
|
||||
client_secret(&client_id)
|
||||
})
|
||||
.await?;
|
||||
let Some(secret) = swarm_secret_client::read_with_startup_retry_or_stop(
|
||||
"reading the queue client secret",
|
||||
stop.clone(),
|
||||
|| client_secret(&client_id),
|
||||
)
|
||||
.await?
|
||||
else {
|
||||
return Ok(());
|
||||
};
|
||||
let reread_id = client_id.clone();
|
||||
let secret = StoredSecret::new(client_id.clone(), secret, move || {
|
||||
let client_id = reread_id.clone();
|
||||
|
|
|
|||
Loading…
Reference in a new issue