diff --git a/src/classes/child-pool.ts b/src/classes/child-pool.ts index 3cd2dfd127..967ae28178 100644 --- a/src/classes/child-pool.ts +++ b/src/classes/child-pool.ts @@ -1,6 +1,6 @@ import { ChildProcess, fork } from 'child_process'; import * as path from 'path'; -import { forEach, values, flatten } from 'lodash'; +import { values, flatten } from 'lodash'; import * as getPort from 'get-port'; import * as fs from 'fs'; import { promisify } from 'util'; diff --git a/src/classes/compat.ts b/src/classes/compat.ts index c9aa80af01..af9f458fa0 100644 --- a/src/classes/compat.ts +++ b/src/classes/compat.ts @@ -20,7 +20,11 @@ // TypeScript Version: 2.8 import { EventEmitter } from 'events'; -import { QueueEvents, Worker, Queue, QueueScheduler, Job } from './'; +import { Job } from './job'; +import { QueueScheduler } from './queue-scheduler'; +import { Queue } from './queue'; +import { Worker } from './worker'; +import { QueueEvents } from './queue-events'; import { JobsOptions, QueueOptions, @@ -30,7 +34,6 @@ import { WorkerOptions, Processor, } from '../interfaces'; -import IORedis = require('ioredis'); type CommonOptions = QueueSchedulerOptions & QueueOptions & diff --git a/src/classes/job.ts b/src/classes/job.ts index 28adc0ab24..4e79eeabac 100644 --- a/src/classes/job.ts +++ b/src/classes/job.ts @@ -3,7 +3,8 @@ import { debuglog } from 'util'; import { RetryErrors } from '../enums'; import { BackoffOptions, JobsOptions, WorkerOptions } from '../interfaces'; import { errorObject, isEmpty, tryCatch } from '../utils'; -import { Backoffs, QueueEvents } from './'; +import { QueueEvents } from './queue-events'; +import { Backoffs } from './backoffs'; import { MinimalQueue, ParentOpts, Scripts } from './scripts'; import { fromPairs } from 'lodash'; diff --git a/src/classes/queue-scheduler.ts b/src/classes/queue-scheduler.ts index a8da71f298..9c84190c90 100644 --- a/src/classes/queue-scheduler.ts +++ b/src/classes/queue-scheduler.ts @@ -1,6 +1,6 @@ import { QueueSchedulerOptions } from '../interfaces'; import { array2obj, isRedisInstance } from '../utils'; -import { QueueBase } from './'; +import { QueueBase } from './queue-base'; import { Scripts } from './scripts'; import { StreamReadRaw } from '../interfaces/redis-streams'; import IORedis = require('ioredis'); diff --git a/src/classes/queue.ts b/src/classes/queue.ts index e8bd55d2ac..74577733da 100644 --- a/src/classes/queue.ts +++ b/src/classes/queue.ts @@ -1,8 +1,9 @@ -import { Parent } from '../interfaces/parent'; import { get } from 'lodash'; import { v4 } from 'uuid'; import { JobsOptions, QueueOptions, RepeatOptions } from '../interfaces'; -import { Job, QueueGetters, Repeat } from './'; +import { Repeat } from './repeat'; +import { QueueGetters } from './queue-getters'; +import { Job } from './job'; import { Scripts } from './scripts'; export class Queue< diff --git a/src/classes/repeat.ts b/src/classes/repeat.ts index 14d4e8fe03..1968eda959 100644 --- a/src/classes/repeat.ts +++ b/src/classes/repeat.ts @@ -1,6 +1,7 @@ import { createHash } from 'crypto'; import { JobsOptions, RepeatOptions } from '../interfaces'; -import { Job, QueueBase } from './'; +import { QueueBase } from './queue-base'; +import { Job } from './job'; const parser = require('cron-parser'); diff --git a/src/classes/scripts.ts b/src/classes/scripts.ts index f098682ea7..3e4a3844ab 100644 --- a/src/classes/scripts.ts +++ b/src/classes/scripts.ts @@ -13,7 +13,9 @@ import { WorkerOptions, } from '../interfaces'; import { array2obj } from '../utils'; -import { QueueBase, QueueScheduler, Worker } from './'; +import { Worker } from './worker'; +import { QueueScheduler } from './queue-scheduler'; +import { QueueBase } from './queue-base'; import { Job, JobJson, JobJsonRaw } from './job'; export type MinimalQueue = Pick<