debug: add INFO logging to ensure_stream and remote_actor_posts_handler
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m42s
test / unit (pull_request) Failing after 10m52s
test / integration (pull_request) Failing after 17m20s
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m42s
test / unit (pull_request) Failing after 10m52s
test / integration (pull_request) Failing after 17m20s
This commit is contained in:
@@ -39,12 +39,17 @@ pub async fn ensure_stream(client: &async_nats::Client) -> Result<(), DomainErro
|
||||
// Try to update first (covers the case where stream exists with stale subjects).
|
||||
// Falls back to create if the stream doesn't exist yet.
|
||||
match js.update_stream(stream_config()).await {
|
||||
Ok(_) => Ok(()),
|
||||
Err(_) => js
|
||||
.get_or_create_stream(stream_config())
|
||||
.await
|
||||
.map(|_| ())
|
||||
.map_err(|e| DomainError::Internal(format!("JetStream stream setup failed: {e}"))),
|
||||
Ok(_) => {
|
||||
tracing::info!(subjects = ?STREAM_SUBJECTS, "JetStream stream updated");
|
||||
Ok(())
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::warn!("JetStream stream update failed ({e}), falling back to get_or_create");
|
||||
js.get_or_create_stream(stream_config())
|
||||
.await
|
||||
.map(|_| ())
|
||||
.map_err(|e| DomainError::Internal(format!("JetStream stream setup failed: {e}")))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user