fix: actix actors will only start on actix_rt

This commit is contained in:
Aravinth Manivannan 2023-12-27 19:44:22 +05:30
parent ba9694b31f
commit 6d90790e58
Signed by: realaravinth
GPG Key ID: F8F50389936984FF
3 changed files with 17 additions and 4 deletions

18
Cargo.lock generated
View File

@ -27,11 +27,22 @@ dependencies = [
]
[[package]]
name = "actix-rt"
version = "2.8.0"
name = "actix-macros"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e"
checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
dependencies = [
"quote",
"syn 2.0.16",
]
[[package]]
name = "actix-rt"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d"
dependencies = [
"actix-macros",
"futures-core",
"tokio",
]
@ -465,6 +476,7 @@ name = "dcache"
version = "0.1.0"
dependencies = [
"actix",
"actix-rt",
"anyhow",
"async-stream",
"async-trait",

View File

@ -33,6 +33,7 @@ tonic = { version = "0.10.2", features = ["transport", "channel"] }
prost = "0.12.3"
tokio-stream = "0.1.14"
async-stream = "0.3.5"
actix-rt = "2.9.0"
[build-dependencies]

View File

@ -40,7 +40,7 @@ pub struct Opt {
pub cluster_size: usize,
}
#[tokio::main]
#[actix_rt::main]
async fn main() -> std::io::Result<()> {
// Setup the logger
tracing_subscriber::fmt()