Skip to content

Commit

Permalink
more lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Dec 18, 2024
1 parent 85bc416 commit 4aac454
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
9 changes: 0 additions & 9 deletions rust_snuba/src/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,11 @@ pub fn consumer_impl(
let processor = if mutations_mode {
let mut_factory = MutConsumerStrategyFactory {
storage_config: first_storage,
env_config,
logical_topic_name,
max_batch_size,
max_batch_time,
processing_concurrency: ConcurrencyConfig::new(concurrency),
clickhouse_concurrency: ConcurrencyConfig::new(clickhouse_concurrency),
async_inserts,
python_max_queue_depth,
use_rust_processor,
health_check_file: health_check_file.map(ToOwned::to_owned),
enforce_schema,
physical_consumer_group: consumer_group.to_owned(),
physical_topic_name: Topic::new(&consumer_config.raw_topic.physical_topic_name),
accountant_topic_config: consumer_config.accountant_topic,
batch_write_timeout,
};

Expand Down
11 changes: 1 addition & 10 deletions rust_snuba/src/mutations/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use sentry_arroyo::processing::strategies::run_task_in_threads::{
};
use sentry_arroyo::processing::strategies::{ProcessingStrategy, ProcessingStrategyFactory};
use sentry_arroyo::types::Message;
use sentry_arroyo::types::{Partition, Topic};
use sentry_arroyo::types::Partition;

use crate::config;
use crate::metrics::global_tags::set_global_tag;
Expand All @@ -25,20 +25,11 @@ use crate::mutations::synchronize::Synchronizer;

pub struct MutConsumerStrategyFactory {
pub storage_config: config::StorageConfig,
pub env_config: config::EnvConfig,
pub logical_topic_name: String,
pub max_batch_size: usize,
pub max_batch_time: Duration,
pub processing_concurrency: ConcurrencyConfig,
pub clickhouse_concurrency: ConcurrencyConfig,
pub async_inserts: bool,
pub python_max_queue_depth: Option<usize>,
pub use_rust_processor: bool,
pub health_check_file: Option<String>,
pub enforce_schema: bool,
pub physical_consumer_group: String,
pub physical_topic_name: Topic,
pub accountant_topic_config: config::TopicConfig,
pub batch_write_timeout: Option<Duration>,
}

Expand Down
2 changes: 1 addition & 1 deletion rust_snuba/src/processors/eap_spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn process_message(
let payload_bytes = payload.payload().context("Expected payload")?;
let msg: FromSpanMessage = serde_json::from_slice(payload_bytes)?;
let origin_timestamp = DateTime::from_timestamp(msg.received as i64, 0);
let mut span: EAPSpan = msg.try_into()?;
let mut span: EAPSpan = msg.into();

span.retention_days = Some(enforce_retention(span.retention_days, &config.env_config));

Expand Down

0 comments on commit 4aac454

Please sign in to comment.