Skip to content

Commit

Permalink
replace ResponseContent::Status with ResponseContent::Workers
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed Apr 28, 2023
1 parent d817d9d commit 7214aa2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/src/command/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ impl CommandServer {
return_success(
command_tx,
thread_client_id,
Success::Status(ResponseContent::Status(worker_info_vec)),
Success::Status(ResponseContent::Workers(worker_info_vec)),
)
.await;
})
Expand Down
8 changes: 4 additions & 4 deletions bin/src/ctl/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ impl CommandManager {
}
match response.content {
Some(response_content) => match response_content {
ResponseContent::Workers(_)
| ResponseContent::Metrics(_)
ResponseContent::Metrics(_)
| ResponseContent::WorkerResponses(_)
| ResponseContent::WorkerMetrics(_)
| ResponseContent::ClustersHashes(_)
Expand All @@ -110,7 +109,7 @@ impl CommandManager {
ResponseContent::FrontendList(frontends) => {
print_frontend_list(frontends)
}
ResponseContent::Status(worker_infos) => {
ResponseContent::Workers(worker_infos) => {
if json {
print_json_response(&worker_infos)?;
} else {
Expand Down Expand Up @@ -204,7 +203,8 @@ impl CommandManager {
.with_context(|| "could not reconnect to the command unix socket")?;

// Do a rolling restart of the workers
let running_workers = worker_infos.vec
let running_workers = worker_infos
.vec
.iter()
.filter(|worker| worker.run_state == RunState::Running as i32)
.collect::<Vec<_>>();
Expand Down
2 changes: 0 additions & 2 deletions command/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ pub enum ResponseContent {
Event(Event),
/// a filtered list of frontend
FrontendList(ListedFrontends),
// TODO: remove as it is redundant with the Workers variant
Status(WorkerInfos),
/// all listeners
ListenersList(ListenersList),

Expand Down

0 comments on commit 7214aa2

Please sign in to comment.