Replace task manager's runNow with runSoon #133550
Labels
Feature:Alerting/RulesFramework
Issues related to the Alerting Rules Framework
Feature:Task Manager
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
TaskManager exposes the ability to run a background task immediately and wait for the task to finish running. This will no longer be feasible in all configurations when a Kibana process can be explicitly configured to no longer run background tasks.
Instead,
runSoon
should replacerunNow
and adjust the task's schedule so that it is run as soon as possible by the next available Kibana process that can run background tasks. If we need these tasks to skip the current queue, we will need to add some type of priority to task-manager's claiming algorithm; however, this should be optional as not all consumers ofrunSoon
will want to skip the queue.Unlike
runNow
,runSoon
will return as soon as the schedule has been updated and before the task has completed running.At the moment, the only consumers of
runNow
outside of alerting are APM. APM is using it to run their telemetry task when it's outdated. However, the results of the telemetry task are not consumed, so a transition torunSoon
will be rather painless. It's worth keeping in mind the usage of runNow when updating a rule will soon transition to a new function and may have merge conflicts (#124850).The text was updated successfully, but these errors were encountered: