Skip to content

Commit

Permalink
feat(ingress): exclude updates from ingress duration metric
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lahaye <mail@chrislahaye.com>
  • Loading branch information
ChrisLahaye committed Sep 1, 2022
1 parent 8eb6f31 commit 514a283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/services/ingress/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ async function processor(state: State, { data }: Job<JobData>) {
const nextData = await poll(state, data);
const now = Date.now();

ingressDurationTimer();

await Promise.all([
nextData.persist &&
StateModel.updateOne(
Expand All @@ -251,8 +253,6 @@ async function processor(state: State, { data }: Job<JobData>) {
state.queue.add('*', nextData, jobOptions),
]);

ingressDurationTimer();

if (nextData.meta) {
watchdogIndexerDelayBlocks.labels(labels).set(state.block - nextData.meta.block.number);
watchdogIndexerError.labels(labels).set(nextData.meta.hasIndexingErrors ? 1 : 0);
Expand Down

0 comments on commit 514a283

Please sign in to comment.