chore: fix format and clippy
This commit is contained in:
parent
fe4d138a14
commit
fcb928bf74
@ -200,11 +200,9 @@ impl ProviderAnalyticsService {
|
||||
}
|
||||
task_count += 1;
|
||||
|
||||
if let Some(outcome) = obj.get("outcome").and_then(|v| v.as_str()) {
|
||||
if outcome == "success" {
|
||||
if matches!(obj.get("outcome").and_then(|v| v.as_str()), Some("success")) {
|
||||
successful_count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(duration) = obj.get("duration_ms").and_then(|v| v.as_u64()) {
|
||||
total_duration_ms += duration;
|
||||
@ -235,6 +233,7 @@ impl ProviderAnalyticsService {
|
||||
}
|
||||
|
||||
/// Get cost forecast for a provider
|
||||
#[allow(clippy::excessive_nesting)]
|
||||
pub async fn forecast_provider_costs(
|
||||
&self,
|
||||
provider: &str,
|
||||
@ -271,14 +270,12 @@ impl ProviderAnalyticsService {
|
||||
|
||||
if let Some(executed_at) = obj.get("executed_at").and_then(|v| v.as_str()) {
|
||||
let date_str = executed_at.split('T').next().unwrap_or("").to_string();
|
||||
|
||||
if let Some(ref last_date) = last_date_str {
|
||||
if let Some(ref last_date) = &last_date_str {
|
||||
if last_date != &date_str && current_day_cost > 0 {
|
||||
daily_costs.push(current_day_cost);
|
||||
current_day_cost = 0;
|
||||
}
|
||||
}
|
||||
|
||||
last_date_str = Some(date_str);
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ use thiserror::Error;
|
||||
use crate::workflow::state::{Phase, StepStatus, Workflow, WorkflowStep};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
#[allow(dead_code)]
|
||||
#[allow(dead_code, clippy::enum_variant_names)]
|
||||
pub enum ParserError {
|
||||
#[error("Failed to read file: {0}")]
|
||||
FileError(#[from] std::io::Error),
|
||||
|
||||
@ -24,6 +24,7 @@ pub struct Scheduler;
|
||||
impl Scheduler {
|
||||
/// Resolve dependencies using topological sort (Kahn's algorithm)
|
||||
/// Returns levels of steps that can be executed in parallel
|
||||
#[allow(clippy::excessive_nesting)]
|
||||
pub fn resolve_dependencies(
|
||||
steps: &[WorkflowStep],
|
||||
) -> Result<Vec<Vec<String>>, SchedulerError> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user