Fix: Scheduled function can not run async functions
Since Lua is not Send, this turned out to be a bit more complicated. In order to make it work the async function needs to be pinned to a single thread. It works now, but the implementation looks a bit messy. Not sure it can be improved through.
This commit is contained in:
11
Cargo.toml
11
Cargo.toml
@@ -43,16 +43,11 @@ enum_dispatch = "0.3.12"
|
||||
indexmap = { version = "2.0.0", features = ["serde"] }
|
||||
serde_yaml = "0.9.27"
|
||||
tokio-cron-scheduler = "0.9.4"
|
||||
mlua = { version = "0.9.7", features = [
|
||||
"lua54",
|
||||
"vendored",
|
||||
"macros",
|
||||
"serialize",
|
||||
"async",
|
||||
"send",
|
||||
] }
|
||||
mlua = { version = "0.9.7", features = ["lua54", "vendored", "macros", "serialize", "async", "send"] }
|
||||
once_cell = "1.19.0"
|
||||
hostname = "0.4.0"
|
||||
tokio-util = { version = "0.7.11", features = ["full"] }
|
||||
uuid = "1.8.0"
|
||||
|
||||
[patch.crates-io]
|
||||
wakey = { git = "https://git.huizinga.dev/Dreaded_X/wakey" }
|
||||
|
||||
Reference in New Issue
Block a user