Skip to content

Commit 162c51f

Browse files
authored
chore(server): upgrade to axum 0.8 (#591)
1 parent bd5ec36 commit 162c51f

File tree

4 files changed

+76
-41
lines changed

4 files changed

+76
-41
lines changed

Cargo.lock

Lines changed: 63 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pyo3-async-runtimes = { version = "0.24.0", features = ["tokio-runtime"] }
2020

2121
anyhow = { version = "1.0.97", features = ["std"] }
2222
async-trait = "0.1.88"
23-
axum = "0.7.9"
24-
axum-extra = { version = "0.9.6", features = ["query"] }
23+
axum = "0.8.4"
24+
axum-extra = { version = "0.10.1", features = ["query"] }
2525
base64 = "0.22.1"
2626
chrono = "0.4.40"
2727
config = "0.14.1"

src/ops/py_factory.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
use std::sync::Arc;
22

3-
use axum::async_trait;
4-
use futures::{future::BoxFuture, FutureExt};
3+
use async_trait::async_trait;
4+
use futures::{FutureExt, future::BoxFuture};
55
use pyo3::{
6-
pyclass, pymethods,
6+
IntoPyObjectExt, Py, PyAny, Python, pyclass, pymethods,
77
types::{IntoPyDict, PyString, PyTuple},
8-
IntoPyObjectExt, Py, PyAny, Python,
98
};
109
use pythonize::pythonize;
1110

@@ -14,7 +13,7 @@ use crate::{
1413
builder::plan,
1514
py::{self, FromPyResult},
1615
};
17-
use anyhow::{anyhow, Result};
16+
use anyhow::{Result, anyhow};
1817

1918
use super::interface::{FlowInstanceContext, SimpleFunctionExecutor, SimpleFunctionFactory};
2019

src/server.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,31 +46,31 @@ pub async fn init_server(
4646
Router::new()
4747
.route("/flows", routing::get(service::flows::list_flows))
4848
.route(
49-
"/flows/:flowInstName",
49+
"/flows/{flowInstName}",
5050
routing::get(service::flows::get_flow),
5151
)
5252
.route(
53-
"/flows/:flowInstName/schema",
53+
"/flows/{flowInstName}/schema",
5454
routing::get(service::flows::get_flow_schema),
5555
)
5656
.route(
57-
"/flows/:flowInstName/keys",
57+
"/flows/{flowInstName}/keys",
5858
routing::get(service::flows::get_keys),
5959
)
6060
.route(
61-
"/flows/:flowInstName/data",
61+
"/flows/{flowInstName}/data",
6262
routing::get(service::flows::evaluate_data),
6363
)
6464
.route(
65-
"/flows/:flowInstName/rowStatus",
65+
"/flows/{flowInstName}/rowStatus",
6666
routing::get(service::flows::get_row_indexing_status),
6767
)
6868
.route(
69-
"/flows/:flowInstName/update",
69+
"/flows/{flowInstName}/update",
7070
routing::post(service::flows::update),
7171
)
7272
.route(
73-
"/flows/:flowInstName/search",
73+
"/flows/{flowInstName}/search",
7474
routing::get(service::search::search),
7575
)
7676
.layer(

0 commit comments

Comments
 (0)