[issue #1591] Add neon_local pageserver status handler

This commit is contained in:
Vadim Kharitonov
2022-08-01 12:53:52 +02:00
committed by Stas Kelvich
parent f7d8db7e39
commit 1bbc8090f3

View File

@@ -910,6 +910,15 @@ fn handle_pageserver(sub_match: &ArgMatches, env: &local_env::LocalEnv) -> Resul
exit(1);
}
}
Some(("status", _)) => match PageServerNode::from_env(env).check_status() {
Ok(_) => println!("Page server is up and running"),
Err(err) => {
eprintln!("Page server is not available: {}", err);
exit(1);
}
},
Some((sub_name, _)) => bail!("Unexpected pageserver subcommand '{}'", sub_name),
None => bail!("no pageserver subcommand provided"),
}