Skip to content

Commit 2df0e38

Browse files
committed
correct EOA worker time metrics
1 parent 015493d commit 2df0e38

File tree

1 file changed

+3
-3
lines changed
  • executors/src/eoa/worker

1 file changed

+3
-3
lines changed

executors/src/eoa/worker/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::eoa::authorization_cache::EoaAuthorizationCache;
2323
use crate::eoa::store::{
2424
AtomicEoaExecutorStore, EoaExecutorStore, EoaExecutorStoreKeys, EoaHealth, SubmissionResult,
2525
};
26-
use crate::metrics::{record_eoa_job_processing_time, current_timestamp_ms, calculate_duration_seconds_from_twmq};
26+
use crate::metrics::{calculate_duration_seconds, calculate_duration_seconds_from_twmq, current_timestamp_ms, record_eoa_job_processing_time};
2727
use crate::webhook::WebhookJobHandler;
2828

2929
pub mod confirm;
@@ -189,15 +189,15 @@ where
189189
signer: self.eoa_signer.clone(),
190190
};
191191

192-
let job_start_time = job.job.created_at;
192+
let job_start_time = current_timestamp_ms();
193193
let result = worker.execute_main_workflow().await?;
194194
if let Err(e) = worker.release_eoa_lock().await {
195195
tracing::error!(error = ?e, "Error releasing EOA lock");
196196
}
197197

198198
// Record EOA job processing metrics
199199
let job_end_time = current_timestamp_ms();
200-
let job_duration = calculate_duration_seconds_from_twmq(job_start_time, job_end_time);
200+
let job_duration = calculate_duration_seconds(job_start_time, job_end_time);
201201
record_eoa_job_processing_time(data.chain_id, job_duration);
202202

203203
if result.is_work_remaining() {

0 commit comments

Comments
 (0)