mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 09:30:37 +00:00
fixed minor issue with merge
This commit is contained in:
@@ -38,10 +38,6 @@ fn status_response_from_state(state: &ComputeState) -> ComputeStatusResponse {
|
||||
|
||||
// Service function to handle all available routes.
|
||||
async fn routes(req: Request<Body>, compute: &Arc<ComputeNode>) -> Response<Body> {
|
||||
let xxx = format!("ROUTING{:?}", req.uri().path().clone());
|
||||
std::fs::write("alek/ROUTES", xxx).expect("routing write file");
|
||||
// TODO: NOTE TO SELF: these things are already being logged to compute.log
|
||||
|
||||
//
|
||||
// NOTE: The URI path is currently included in traces. That's OK because
|
||||
// it doesn't contain any variable parts or sensitive information. But
|
||||
@@ -347,6 +343,9 @@ async fn serve(port: u16, state: Arc<ComputeNode>) {
|
||||
pub fn launch_http_server(port: u16, state: &Arc<ComputeNode>) -> Result<thread::JoinHandle<()>> {
|
||||
let state = Arc::clone(state);
|
||||
|
||||
let xxx = format!("ROUTING port: {port}");
|
||||
std::fs::write("alek/ROUTES", xxx).expect("routing write file");
|
||||
|
||||
Ok(thread::Builder::new()
|
||||
.name("http-endpoint".into())
|
||||
.spawn(move || serve(port, state))?)
|
||||
|
||||
@@ -187,10 +187,7 @@ impl GenericRemoteStorage {
|
||||
// A function for listing all the files in a "directory"
|
||||
// Example:
|
||||
// list_files("foo/bar") = ["foo/bar/a.txt", "foo/bar/b.txt"]
|
||||
pub async fn list_files(
|
||||
&self,
|
||||
folder: Option<&RemotePath>
|
||||
) -> anyhow::Result<Vec<RemotePath>>{
|
||||
pub async fn list_files(&self, folder: Option<&RemotePath>) -> anyhow::Result<Vec<RemotePath>> {
|
||||
match self {
|
||||
Self::LocalFs(s) => s.list_files(folder).await,
|
||||
Self::AwsS3(s) => s.list_files(folder).await,
|
||||
@@ -212,14 +209,6 @@ impl GenericRemoteStorage {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn list_files(&self, folder: Option<&RemotePath>) -> anyhow::Result<Vec<RemotePath>> {
|
||||
match self {
|
||||
Self::LocalFs(s) => s.list_files(folder).await,
|
||||
Self::AwsS3(s) => s.list_files(folder).await,
|
||||
Self::Unreliable(s) => s.list_files(folder).await,
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn upload(
|
||||
&self,
|
||||
from: impl io::AsyncRead + Unpin + Send + Sync + 'static,
|
||||
|
||||
@@ -82,8 +82,10 @@ def test_file_download(neon_env_builder: NeonEnvBuilder):
|
||||
|
||||
# step 5 attempt 2
|
||||
# TODO: I'm not even remotely confident this is the correct port
|
||||
# response = requests.post("http://localhost:15000/extension_server/postgis-3.so")
|
||||
# print(response)
|
||||
# response = requests.post("http://localhost:8080/extension_server/postgis-3.so")
|
||||
log.info("*\n" * 100)
|
||||
log.info("IMPORTANT")
|
||||
# log.info(response.content)
|
||||
|
||||
with closing(endpoint.connect()) as conn:
|
||||
with conn.cursor() as cur:
|
||||
|
||||
Reference in New Issue
Block a user