[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>
This commit is contained in:
Shahzad 2025-05-31 11:41:41 +02:00 committed by GitHub
parent f015ead79e
commit 616db37896
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -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);

View file

@ -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`);
};