Skip to content

Commit 4904a67

Browse files
committed
Fix locks_released
1 parent 85c446b commit 4904a67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/labrinth/src/database/redis.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,18 +521,18 @@ impl RedisPool {
521521
.await?
522522
};
523523

524-
let none_count =
524+
let exist_count =
525525
results.into_iter().filter(|x| x.is_some()).count();
526526

527527
// None of the locks exist anymore, we can continue
528-
if none_count == 0 {
528+
if exist_count == 0 {
529529
break;
530530
}
531531

532532
let spinning = Utc::now() - start;
533533
if spinning > chrono::Duration::seconds(5) {
534534
return Err(DatabaseError::CacheTimeout {
535-
locks_released: none_count,
535+
locks_released: subscribe_ids.len() - exist_count,
536536
locks_waiting: subscribe_ids.len(),
537537
time_spent_pool_wait_ms: redis_budget.as_millis()
538538
as u64,

0 commit comments

Comments
 (0)