migrating to typescript
This commit is contained in:
parent
4c1f33d138
commit
6dd3d011b7
|
@ -18,8 +18,7 @@
|
|||
*
|
||||
* @author Anatoly Khaytovich <anatolyuss@gmail.com>
|
||||
*/
|
||||
import { ChildProcess } from 'child_process';
|
||||
import * as childProcess from 'child_process';
|
||||
import { ChildProcess, fork } from 'child_process';
|
||||
import * as path from 'path';
|
||||
import log from './Logger';
|
||||
import Conversion from './Conversion';
|
||||
|
@ -116,7 +115,7 @@ async function pipeData(conversion: Conversion, dataLoaderPath: string, options:
|
|||
return processConstraints(conversion);
|
||||
}
|
||||
|
||||
const loaderProcess: ChildProcess = childProcess.fork(dataLoaderPath, options);
|
||||
const loaderProcess: ChildProcess = fork(dataLoaderPath, options);
|
||||
const bandwidth: number[] = fillBandwidth(conversion);
|
||||
const chunksToLoad: any[] = bandwidth.map((index: number) => conversion._dataPool[index]);
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import boot from './BootProcessor';
|
|||
import { createStateLogsTable } from './MigrationStateManager';
|
||||
import { createDataPoolTable, readDataPool } from './DataPoolManager';
|
||||
import log from './Logger';
|
||||
import { Stats } from 'fs';
|
||||
|
||||
export class Main {
|
||||
/**
|
||||
|
@ -90,7 +89,7 @@ export class Main {
|
|||
public createLogsDirectory(self: Conversion): Promise<Conversion> {
|
||||
return new Promise(resolve => {
|
||||
console.log('\t--[DirectoriesManager.createLogsDirectory] Creating logs directory...');
|
||||
fs.stat(self._logsDirPath, (directoryDoesNotExist: Error, stat: Stats) => {
|
||||
fs.stat(self._logsDirPath, (directoryDoesNotExist: Error, stat: fs.Stats) => {
|
||||
if (directoryDoesNotExist) {
|
||||
fs.mkdir(self._logsDirPath, self._0777, e => {
|
||||
if (e) {
|
||||
|
|
Loading…
Reference in a new issue