some code got lost in all the commits, deploying again
This commit is contained in:
parent
0f4d12e2a5
commit
bbdff1d916
@ -31,7 +31,7 @@ use std::num::NonZeroU64;
|
||||
use std::str::FromStr;
|
||||
use std::sync::atomic::{self, Ordering};
|
||||
use std::sync::Arc;
|
||||
use tracing::trace;
|
||||
use tracing::{trace, warn};
|
||||
|
||||
pub use stat_buffer::{SpawnedStatBuffer, StatBuffer};
|
||||
|
||||
@ -199,6 +199,9 @@ impl BufferedRpcQueryStats {
|
||||
self.sum_response_bytes += stat.response_bytes;
|
||||
self.sum_response_millis += stat.response_millis;
|
||||
self.sum_credits_used += stat.compute_unit_cost;
|
||||
|
||||
let latest_balance = stat.authorization.checks.latest_balance.read();
|
||||
self.latest_balance = latest_balance.clone();
|
||||
}
|
||||
|
||||
async fn _save_db_stats(
|
||||
@ -723,8 +726,7 @@ impl BufferedRpcQueryStats {
|
||||
builder = builder.tag("method", key.method);
|
||||
|
||||
// Read the latest balance ...
|
||||
let remaining = self.latest_balance.read().remaining();
|
||||
|
||||
let remaining = self.latest_balance.remaining();
|
||||
trace!("Remaining balance for influx is {:?}", remaining);
|
||||
|
||||
builder = builder
|
||||
|
@ -29,7 +29,7 @@ pub struct BufferedRpcQueryStats {
|
||||
pub sum_credits_used: Decimal,
|
||||
pub sum_cu_used: Decimal,
|
||||
/// The user's balance at this point in time. Multiple queries might be modifying it at once.
|
||||
pub latest_balance: Arc<RwLock<Balance>>,
|
||||
pub latest_balance: Balance,
|
||||
}
|
||||
|
||||
#[derive(From)]
|
||||
|
Loading…
Reference in New Issue
Block a user