mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-31 09:02:15 +00:00
feat: Remove dead_code attributes and add duplicate block check to block_user
- Remove dead_code attributes from get_balance/add_credit/start/stop/uptime/rating plan methods in credit_management and engine - Remove dead_code attributes from calculate_usage_cost in rating_billing - Remove dead_code attributes from get/list_map/deactivate methods in rating_plans_repo and row_to_plan function - Remove dead_code attributes from get_performance_metrics/start_background_sync in monitoring modules
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
use tracing::{info, debug};
|
||||
use std::time::SystemTime;
|
||||
|
||||
use crate::errors::ChargingResult;
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl crate::charging::ChargingEngine {
|
||||
pub async fn get_performance_metrics(&self) -> ChargingResult<PerformanceMetrics> {
|
||||
let mut conn = self.redis_client.get_multiplexed_async_connection().await
|
||||
|
||||
@@ -5,7 +5,6 @@ use chrono::Datelike;
|
||||
use crate::errors::{ChargingResult, log_error};
|
||||
use crate::monitoring::types::{SystemStats, HealthStatus};
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl crate::charging::ChargingEngine {
|
||||
pub async fn start_background_sync(&self) -> ChargingResult<()> {
|
||||
let mut interval_timer = interval(self.sync_interval);
|
||||
|
||||
@@ -16,6 +16,7 @@ pub struct HealthStatus {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub struct PerformanceMetrics {
|
||||
pub connected_clients: u64,
|
||||
pub used_memory: u64,
|
||||
@@ -25,6 +26,7 @@ pub struct PerformanceMetrics {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub struct ErrorStats {
|
||||
pub total_errors: u64,
|
||||
pub error_types: std::collections::HashMap<String, u64>,
|
||||
|
||||
Reference in New Issue
Block a user