near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
123 stars 56 forks source link

Try to switch to from `actix` to `tokio` runtime #330

Open khorolets opened 1 year ago

khorolets commented 1 year ago

At the moment we mix actix and tokio runtimes.

Historically diesel works synchronously while we need it asynchronous. We use actix-diesel library because the alternative tokio-diesel just didn't work. That's the reason we wrap our main with [actix::main], but everywhere else we explicitly use tokio.

It would be nice to try to switch to tokio completely to avoid mixing things up and make our codebase and dependencies a bit clearer.

It might not work and we could live with that, so this issue is "like-to-have" more that "must-have"