Resource Busy errors #5691
-
Perhaps related to #2862 although that was resolved in #2999 How do I avoid these? I'm getting Resource Busy errors with the code: match db.query("INSERT INTO website $array
ON DUPLICATE KEY UPDATE
accessed_at = time::now(),
crawled = crawled OR $input.crawled
RETURN VALUE id;",)
.bind(("array", all))
.await {
Ok(mut id) => match id.take::<Vec<Thing>>(0) {
Ok(mut x) => things.append(&mut x),
Err(err) => match err {
Api(error) => {
eprintln!("{:?}", error);
error!("{:?}", error);
}
_ => error!("{:?}", err),
},
},
Err(err) => {
error!("{:?}", err);
} but since it's all one query shouldn't it not fail like that? |
Beta Was this translation helpful? Give feedback.
Answered by
Rushmore75
Mar 20, 2025
Replies: 1 comment
-
this was a me issue. solve by making a lock for this function so only one thread could access it at a time |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Rushmore75
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this was a me issue.
solve by making a lock for this function so only one thread could access it at a time