-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Expose task manager as plugin instead of server argument #42966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ export function scheduleTask(server, taskManager) { | |
| } | ||
|
|
||
| export function registerMapsTelemetryTask(server) { | ||
| const taskManager = server.taskManager; | ||
| const taskManager = server.plugins.task_manager; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, should check for null.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just checking in on the changes, which LGTM A null check for this might be moot to do from the maps plugin, since the plugin definition It's odd that part ^^ worked before this PR |
||
| taskManager.registerTaskDefinitions({ | ||
| [TELEMETRY_TASK_TYPE]: { | ||
| title: 'Maps telemetry fetch task', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ import { PLUGIN_ID, VIS_TELEMETRY_TASK, VIS_TELEMETRY_TASK_NUM_WORKERS } from '. | |
| import { visualizationsTaskRunner } from './visualizations/task_runner'; | ||
|
|
||
| export function registerTasks(server: HapiServer) { | ||
| const { taskManager } = server; | ||
| const taskManager = server.plugins.task_manager; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here re: null check |
||
|
|
||
| taskManager.registerTaskDefinitions({ | ||
| [VIS_TELEMETRY_TASK]: { | ||
|
|
@@ -26,7 +26,7 @@ export function registerTasks(server: HapiServer) { | |
| } | ||
|
|
||
| export function scheduleTasks(server: HapiServer) { | ||
| const { taskManager } = server; | ||
| const taskManager = server.plugins.task_manager; | ||
| const { kbnServer } = server.plugins.xpack_main.status.plugin; | ||
|
|
||
| kbnServer.afterPluginsInit(() => { | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.