Skip to content

Commit

Permalink
feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Apr 15, 2020
1 parent 6ac297d commit 74b48d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 4 additions & 7 deletions x-pack/legacy/plugins/reporting/server/lib/esqueue/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,10 @@ export class Worker extends events.EventEmitter {
const completedTime = moment().toISOString();
const docOutput = this._formatOutput(output);

let status;
if (output && output.warnings && output.warnings.length > 0) {
status = constants.JOB_STATUS_WARNINGS;
} else {
status = constants.JOB_STATUS_COMPLETED;
}

const status =
output && output.warnings && output.warnings.length > 0
? constants.JOB_STATUS_WARNINGS
: constants.JOB_STATUS_COMPLETED;
const doc = {
status,
completed_at: completedTime,
Expand Down
3 changes: 2 additions & 1 deletion x-pack/legacy/plugins/reporting/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { EventEmitter } from 'events';
import { ResponseObject } from 'hapi';
import { Legacy } from 'kibana';
import { CallCluster } from '../../../../src/legacy/core_plugins/elasticsearch';
import { JobStatus } from '../../../plugins/reporting'; // reporting new platform
import { CancellationToken } from './common/cancellation_token';
import { ReportingCore } from './server/core';
import { LevelLogger } from './server/lib/level_logger';
Expand Down Expand Up @@ -150,7 +151,7 @@ export interface JobSource<JobParamsType> {
jobtype: string;
output: JobDocOutput;
payload: JobDocPayload<JobParamsType>;
status: string; // completed, failed, etc
status: JobStatus;
};
}

Expand Down

0 comments on commit 74b48d9

Please sign in to comment.