We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85c446b commit 4904a67Copy full SHA for 4904a67
apps/labrinth/src/database/redis.rs
@@ -521,18 +521,18 @@ impl RedisPool {
521
.await?
522
};
523
524
- let none_count =
+ let exist_count =
525
results.into_iter().filter(|x| x.is_some()).count();
526
527
// None of the locks exist anymore, we can continue
528
- if none_count == 0 {
+ if exist_count == 0 {
529
break;
530
}
531
532
let spinning = Utc::now() - start;
533
if spinning > chrono::Duration::seconds(5) {
534
return Err(DatabaseError::CacheTimeout {
535
- locks_released: none_count,
+ locks_released: subscribe_ids.len() - exist_count,
536
locks_waiting: subscribe_ids.len(),
537
time_spent_pool_wait_ms: redis_budget.as_millis()
538
as u64,
0 commit comments