diff --git a/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.test.ts b/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.test.ts index 07ab063b7c980..699cbc8a2d83a 100644 --- a/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.test.ts +++ b/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.test.ts @@ -151,7 +151,7 @@ describe('TaskManagerMetricsCollector', () => { return; } - if(taskStatus == 'idle') { + if(taskStatus.value == 'idle') { emit((new Date().getTime() - runAt.value.getMillis()) / 1000); } else { def retryAt = doc['task.retryAt']; diff --git a/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.ts b/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.ts index a35bb5ddf5a72..75b8a8beec5e8 100644 --- a/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.ts +++ b/x-pack/plugins/task_manager/server/metrics/task_metrics_collector.ts @@ -110,7 +110,7 @@ export class TaskManagerMetricsCollector implements ITaskEventEmitter