Skip to content

Diesel DB calls are blocking #64

@jaythomas

Description

@jaythomas

Feedback received from Reddit user Hersenbeuker:

You're using blocking Diesel database calls: https://github.com/codi-hacks/weather-station/blob/master/api-server/src/sensors/routes.rs#L16

This blocks the async runtime, you have to use the actix block functions to move these calls to the actix threadpool: https://actix.rs/docs/databases/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions