Skip to content

Commit

Permalink
use ParentMsgs helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed May 19, 2020
1 parent 5fc11e5 commit 3fc74ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/kbn-optimizer/src/optimizer/observe_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ import { inspect } from 'util';
import * as Rx from 'rxjs';
import { map, filter, takeUntil } from 'rxjs/operators';

import { isWorkerMsg, isWorkerPing, WorkerConfig, WorkerMsg, Bundle } from '../common';
import { isWorkerMsg, isWorkerPing, WorkerConfig, WorkerMsg, Bundle, ParentMsgs } from '../common';

import { OptimizerConfig } from './optimizer_config';

const parentMsgs = new ParentMsgs();

export interface WorkerStdio {
type: 'worker stdio';
stream: 'stdout' | 'stderr';
Expand Down Expand Up @@ -152,8 +154,7 @@ export function observeWorker(
return true;
}

const pong: WorkerPongMsg = { type: 'pong' };
proc.send(pong);
proc.send(parentMsgs.pong());
return false;
}),

Expand Down

0 comments on commit 3fc74ca

Please sign in to comment.