Skip to content

Commit

Permalink
It should be in place where the task gets added not when it starts
Browse files Browse the repository at this point in the history
  • Loading branch information
pixincreate committed Jan 18, 2024
1 parent 76a1556 commit ec84e39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions crates/router/src/core/payment_methods/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2855,6 +2855,14 @@ impl TempLockerCardSupport {
)
.await?;
metrics::TOKENIZED_DATA_COUNT.add(&metrics::CONTEXT, 1, &[]);
metrics::TASKS_ADDED_COUNT.add(
&metrics::CONTEXT,
1,
&[metrics::request::add_attributes(
"flow",
"DeleteTokenizeData",
)],
);
Ok(card)
}
}
Expand Down
8 changes: 0 additions & 8 deletions crates/router/src/core/payment_methods/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,14 +984,6 @@ pub async fn start_tokenize_data_workflow(
.clone()
.finish_with_status(db.as_scheduler(), format!("COMPLETED_BY_PT_{id}"))
.await?;
metrics::TASKS_ADDED_COUNT.add(
&metrics::CONTEXT,
1,
&[metrics::request::add_attributes(
"flow",
"DeleteTokenizeData",
)],
);
}
Err(err) => {
logger::error!("Err: Deleting Card From Locker : {:?}", err);
Expand Down

0 comments on commit ec84e39

Please sign in to comment.