Skip to content

Commit

Permalink
Merge 17c7378 into d8bf244
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Dec 21, 2019
2 parents d8bf244 + 17c7378 commit cf1065f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"lodash": "^4.17.11",
"node-uuid": "^1.4.8",
"semver": "^6.3.0",
"tslib": "^1.10.0",
"uuid": "^3.3.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/classes/child-pool.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import childProcess, { ChildProcess } from 'child_process';
import path from 'path';
import _ from 'lodash';
import { forEach, values, flatten } from 'lodash';
import getPort from 'get-port';
import fs from 'fs';
import { promisify } from 'util';
Expand All @@ -16,7 +16,7 @@ const convertExecArgv = async (execArgv: string[]): Promise<string[]> => {
const standard: string[] = [];
const convertedArgs: string[] = [];

_.forEach(execArgv, async arg => {
forEach(execArgv, async arg => {
if (arg.indexOf('--inspect') === -1) {
standard.push(arg);
} else {
Expand Down Expand Up @@ -96,7 +96,7 @@ export class ChildPool {
}

clean() {
const children = _.values(this.retained).concat(this.getAllFree());
const children = values(this.retained).concat(this.getAllFree());

children.forEach(child => {
// TODO: We may want to use SIGKILL if the process does not die after some time.
Expand All @@ -112,7 +112,7 @@ export class ChildPool {
}

getAllFree() {
return _.flatten(_.values(this.free));
return flatten(values(this.free));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/classes/master.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/
import { promisify } from 'util';
import _ from 'lodash';
import { toString } from 'lodash';

let status: any;
let processor: any;
Expand Down Expand Up @@ -83,7 +83,7 @@ process.on('message', async msg => {

process.on('uncaughtException', err => {
if (!err.message) {
err = new Error(_.toString(err));
err = new Error(toString(err));
}
process.send({
cmd: 'failed',
Expand Down
7 changes: 2 additions & 5 deletions src/test/test_repeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { expect } from 'chai';
import IORedis from 'ioredis';
import { beforeEach, describe, it } from 'mocha';
import { v4 } from 'uuid';
import { defaults } from 'lodash';

const sinon = require('sinon');
const moment = require('moment');
const _ = require('lodash');

const ONE_SECOND = 1000;
const ONE_MINUTE = 60 * ONE_SECOND;
Expand Down Expand Up @@ -522,10 +522,7 @@ describe('repeat', function() {
repeatWorker.addNextRepeatableJob = async (...args) => {
// In order to simulate race condition
// Make removeRepeatables happen any time after a moveToX is called
await queue.removeRepeatable(
'test',
_.defaults({ jobId }, repeatOpts),
);
await queue.removeRepeatable('test', defaults({ jobId }, repeatOpts));

// nextRepeatableJob will now re-add the removed repeatable
const result = await nextRepeatableJob.apply(repeat, args);
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5645,7 +5645,7 @@ tslib@1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
integrity sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==

tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
tslib@^1.10.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
Expand Down

0 comments on commit cf1065f

Please sign in to comment.