Skip to content

Commit a8ed1f4

Browse files
[Reporting] Update more Server Types for TaskManager (#74915)
* [Reporting] Update more Server Types for TaskManager * remove some task manager references * more strict * more strict 2 * simplify * fix test * fix test * routing validation unused types cleanup * remove more casting in route handlers * feedback changes * original comment was fine Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent ee9a8d2 commit a8ed1f4

37 files changed

+774
-415
lines changed

x-pack/plugins/reporting/server/core.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { HeadlessChromiumDriverFactory } from './browsers/chromium/driver_factor
2323
import { screenshotsObservableFactory } from './lib/screenshots';
2424
import { checkLicense, getExportTypesRegistry } from './lib';
2525
import { ESQueueInstance } from './lib/create_queue';
26-
import { EnqueueJobFn } from './lib/enqueue_job';
2726
import { ReportingStore } from './lib/store';
2827

2928
export interface ReportingInternalSetup {
@@ -36,7 +35,6 @@ export interface ReportingInternalSetup {
3635

3736
export interface ReportingInternalStart {
3837
browserDriverFactory: HeadlessChromiumDriverFactory;
39-
enqueueJob: EnqueueJobFn;
4038
esqueue: ESQueueInstance;
4139
store: ReportingStore;
4240
savedObjects: SavedObjectsServiceStart;
@@ -115,7 +113,7 @@ export class ReportingCore {
115113
/*
116114
* Gives async access to the startDeps
117115
*/
118-
private async getPluginStartDeps() {
116+
public async getPluginStartDeps() {
119117
if (this.pluginStartDeps) {
120118
return this.pluginStartDeps;
121119
}
@@ -131,10 +129,6 @@ export class ReportingCore {
131129
return (await this.getPluginStartDeps()).esqueue;
132130
}
133131

134-
public async getEnqueueJob() {
135-
return (await this.getPluginStartDeps()).enqueueJob;
136-
}
137-
138132
public async getLicenseInfo() {
139133
const { licensing } = this.getPluginSetupDeps();
140134
return await licensing.license$

x-pack/plugins/reporting/server/export_types/csv/create_job.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
*/
66

77
import { cryptoFactory } from '../../lib';
8-
import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../types';
8+
import { CreateJobFn, ScheduleTaskFnFactory } from '../../types';
99
import { JobParamsDiscoverCsv } from './types';
1010

11-
export const scheduleTaskFnFactory: ScheduleTaskFnFactory<ESQueueCreateJobFn<
11+
export const scheduleTaskFnFactory: ScheduleTaskFnFactory<CreateJobFn<
1212
JobParamsDiscoverCsv
1313
>> = function createJobFactoryFn(reporting) {
1414
const config = reporting.getConfig();

0 commit comments

Comments
 (0)