Skip to content

Commit 673958e

Browse files
clean up code after checking rate limiting and metric logic
1 parent 70eb032 commit 673958e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

relay-server/src/processing/client_reports/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ impl processing::Processor for ClientReportsProcessor {
9292
.enforce_quotas(&mut client_reports, ctx)
9393
.await?;
9494

95-
// FIXME: Not sure if we want to emit some metrics here still
96-
Ok(Output {
97-
main: None,
98-
metrics: None,
99-
})
95+
Ok(Output::empty())
10096
}
10197
}
10298

@@ -114,7 +110,6 @@ pub struct SerializedClientReport {
114110

115111
impl Counted for SerializedClientReport {
116112
fn quantities(&self) -> Quantities {
117-
// TODO: Check the envelope rete_limiter
118113
smallvec::smallvec![]
119114
}
120115
}

relay-server/src/processing/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ impl<T> Output<T> {
156156
}
157157
}
158158

159+
/// Creates an new output with neither main nor metrics.
160+
pub fn empty() -> Self {
161+
Self {
162+
main: None,
163+
metrics: None,
164+
}
165+
}
166+
159167
/// Maps an `Output<T>` to `Output<S>` by applying a function to [`Self::main`].
160168
pub fn map<F, S>(self, f: F) -> Output<S>
161169
where

0 commit comments

Comments
 (0)