Skip to content

thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/context.rs:37:26 #68

@Json1949

Description

@Json1949

main.rs

let main_redis = redis_async::client::paired_connect("172.0.0.1:6800".parse().unwrap()).await.unwrap();

Cargo.toml

[dependencies]
actix-web = "*"
async-trait = "*"


redis-async = "*"

sqlx = { version = "0.4.1", features = [ 'runtime-actix-rustls', "mysql" ] }
async-std = { version = "1.6", features = [ "attributes" ] }

#redis = { version = "0.19.0", features = ["async-std-tls-comp"] }


serde = { version = "*", features = ["derive"] }
serde_json = "*"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions