Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed May 11, 2020
1 parent 4283317 commit 4a2985d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,10 @@ export class TaskConfigurationsService extends TaskService {
const source = resolvedTask._source;
const taskLabel = resolvedTask.label;

const startResolve = new Date().valueOf();

const terminal = await this.taskTerminalWidgetManager.open(this.getFactoryOptions(resolvedTask), this.getOpenerOptions(resolvedTask));

try {
const taskInfo = await this.taskServer.run(resolvedTask, this.getContext(), option);

const finishResolve = new Date().valueOf();
console.error('!!!!! CHE TASK service !!! terminal + run 9-10 ', (finishResolve - startResolve) / 1000);

terminal.start(taskInfo.terminalId);

this.lastTask = { source, taskLabel, scope: resolvedTask._scope };
Expand Down Expand Up @@ -76,7 +70,7 @@ export class TaskConfigurationsService extends TaskService {
const taskConfig = taskInfo ? taskInfo.config : undefined;
const widget = await this.taskTerminalWidgetManager.open(
this.getFactoryOptions(taskConfig),
this.getOpenerOptions(taskConfig, taskId));
this.getOpenerOptions(taskConfig));

widget.start(terminalId);
}
Expand All @@ -100,7 +94,7 @@ export class TaskConfigurationsService extends TaskService {
};
}

protected getOpenerOptions(taskConfig?: TaskConfiguration, taskId?: number): TaskTerminalWidgetOpenerOptions {
protected getOpenerOptions(taskConfig?: TaskConfiguration): TaskTerminalWidgetOpenerOptions {
return {
widgetOptions: { area: 'bottom' },
mode: this.getWidgetOpenMode(taskConfig),
Expand Down
3 changes: 0 additions & 3 deletions plugins/task-plugin/src/task/che-task-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ export class CheTaskRunner {
};

const execId = await this.machineExecClient.getExecId(machineExec);
if (label === 'test') {
throw new Error("Che task config must have 'target.containerName' property specified");
}

return {
taskId: STUB_TASK_ID,
Expand Down

0 comments on commit 4a2985d

Please sign in to comment.