mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
mutual exclusion seems to work well!
This commit is contained in:
1 parent
373726b685
commit
9ce83025b4
2 files changed
+4
-2
No files matched your search
@@ -138,6 +138,8 @@ FOR UPDATE
|
||||
info!("Can acquire lock??? {}", can_transact);
|
||||
|
||||
if !can_transact {
|
||||
info!("returning");
|
||||
transaction.rollback().await?;
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ async fn main_loop(inferencer: Inferencer) {
|
||||
|
||||
if jobs.is_empty() {
|
||||
info!("No jobs!");
|
||||
std::thread::sleep(Duration::from_millis(1500));
|
||||
std::thread::sleep(Duration::from_millis(20));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ async fn main_loop(inferencer: Inferencer) {
|
||||
|
||||
timeout_millis = START_TIMEOUT_MILLIS; // reset
|
||||
|
||||
std::thread::sleep(Duration::from_millis(500));
|
||||
std::thread::sleep(Duration::from_millis(20));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user