From 616db378964ca2bcfc1c992e4b000e18760dcf42 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Sat, 31 May 2025 11:41:41 +0200 Subject: [PATCH] [Synthetics] Remove run soon for sync private location task !! (#222062) ## Summary Remove run soon for sync private location task !! It's not needed since it's a scheduled task running every 10 minutes . --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../observability/plugins/synthetics/server/plugin.ts | 4 ++-- .../server/tasks/sync_private_locations_monitors_task.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/solutions/observability/plugins/synthetics/server/plugin.ts b/x-pack/solutions/observability/plugins/synthetics/server/plugin.ts index 5783a44b1f0f..d25f265e6892 100644 --- a/x-pack/solutions/observability/plugins/synthetics/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/synthetics/server/plugin.ts @@ -115,8 +115,8 @@ export class Plugin implements PluginType { this.server.spaces = pluginsStart.spaces; this.server.isElasticsearchServerless = coreStart.elasticsearch.getCapabilities().serverless; } - this.syncPrivateLocationMonitorsTask?.start().catch(() => { - this.logger.error('Failed to start sync private location monitors task'); + this.syncPrivateLocationMonitorsTask?.start().catch((e) => { + this.logger.error('Failed to start sync private location monitors task', { error: e }); }); this.syntheticsService?.start(pluginsStart.taskManager); diff --git a/x-pack/solutions/observability/plugins/synthetics/server/tasks/sync_private_locations_monitors_task.ts b/x-pack/solutions/observability/plugins/synthetics/server/tasks/sync_private_locations_monitors_task.ts index 47632ee76ace..6650dfcefe6e 100644 --- a/x-pack/solutions/observability/plugins/synthetics/server/tasks/sync_private_locations_monitors_task.ts +++ b/x-pack/solutions/observability/plugins/synthetics/server/tasks/sync_private_locations_monitors_task.ts @@ -139,7 +139,6 @@ export class SyncPrivateLocationMonitorsTask { taskType: TASK_TYPE, params: {}, }); - await taskManager.runSoon(TASK_ID); logger.debug(`Sync private location monitors task scheduled successfully`); };