Skip to content

Commit 4fcbeee

Browse files
assign _findAndLockNextJob to findAndLockNextJob
Signed-off-by: Haris Sulaiman <[email protected]>
1 parent 77051dc commit 4fcbeee

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/agenda/index.ts

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import humanInterval from "human-interval";
21
import { EventEmitter } from "events";
2+
import humanInterval from "human-interval";
33
import {
4-
MongoClient,
5-
Db as MongoDb,
4+
AnyError,
65
Collection,
6+
Db as MongoDb,
7+
MongoClient,
78
MongoClientOptions,
8-
AnyError,
99
} from "mongodb";
10-
import { JobProcessingQueue } from "./job-processing-queue";
10+
import { Job } from "../job";
1111
import { cancel } from "./cancel";
1212
import { close } from "./close";
1313
import { create } from "./create";
@@ -20,6 +20,8 @@ import { define } from "./define";
2020
import { disable } from "./disable";
2121
import { enable } from "./enable";
2222
import { every } from "./every";
23+
import { findAndLockNextJob } from "./find-and-lock-next-job";
24+
import { JobProcessingQueue } from "./job-processing-queue";
2325
import { jobs } from "./jobs";
2426
import { lockLimit } from "./lock-limit";
2527
import { maxConcurrency } from "./max-concurrency";
@@ -33,8 +35,6 @@ import { schedule } from "./schedule";
3335
import { sort } from "./sort";
3436
import { start } from "./start";
3537
import { stop } from "./stop";
36-
import { findAndLockNextJob } from "./find-and-lock-next-job";
37-
import { Job } from "../job";
3838

3939
export interface AgendaConfig {
4040
name?: string;
@@ -79,7 +79,7 @@ class Agenda extends EventEmitter {
7979
_defaultLockLifetime: any;
8080
_defaultLockLimit: any;
8181
_definitions: any;
82-
_findAndLockNextJob: any;
82+
_findAndLockNextJob = findAndLockNextJob;
8383
_indices: any;
8484
_isLockingOnTheFly: boolean;
8585
_isJobQueueFilling: Map<string, boolean>;
@@ -192,7 +192,6 @@ class Agenda extends EventEmitter {
192192
}
193193
}
194194

195-
Agenda.prototype._findAndLockNextJob = findAndLockNextJob;
196195
Agenda.prototype.cancel = cancel;
197196
Agenda.prototype.close = close;
198197
Agenda.prototype.create = create;

0 commit comments

Comments
 (0)