-
-
Notifications
You must be signed in to change notification settings - Fork 7
fix(taskbroker): Replace worker_map Default Instead of Merging
#756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -318,14 +318,19 @@ async fn main() -> Result<(), Error> { | |
| let mut map = HashMap::new(); | ||
|
|
||
| for (application, endpoint) in config.worker_map.clone() { | ||
| let worker = match Worker::connect(config.clone(), endpoint).await { | ||
| let worker = match Worker::connect(config.clone(), endpoint.clone()).await { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good point, can we have the startup fail if the worker map is empty?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yepp, I added a |
||
| Ok(w) => { | ||
|
sentry[bot] marked this conversation as resolved.
|
||
| debug!("Connected to worker!"); | ||
| debug!(application, endpoint, "Connected to worker!"); | ||
| Box::new(w) as Box<dyn WorkerClient> | ||
| } | ||
|
|
||
| Err(e) => { | ||
| error!(error = ?e, "Failed to connect to worker"); | ||
| error!( | ||
| application, | ||
| endpoint, | ||
| error = ?e, | ||
| "Failed to connect to worker" | ||
| ); | ||
| return Err(e); | ||
| } | ||
| }; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.