Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Jun 11, 2024
1 parent f3cc746 commit 74736b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions perfTest/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare global {
namespace GraphileWorker {
interface Tasks {
latency: { id: number };
}
}
}

export type Foo = "Foo";
1 change: 0 additions & 1 deletion src/localQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import assert from "assert";
import {
CompiledSharedOptions,
EnhancedWithPgClient,
PromiseOrDirect,
WorkerPoolOptions,
} from ".";
import { MINUTE, SECOND } from "./cronConstants";
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,11 @@ export function _runTaskList(
get worker() {
return concurrency === 1 ? this._workers[0] ?? null : null;
},
nudge(this: WorkerPool, n: number) {
nudge(this: WorkerPool, count: number) {
if (localQueue) {
localQueue.pulse();
} else {
let n = count;
// Nudge up to `n` workers
this._workers.some((worker) => worker.nudge() && --n <= 0);
}
Expand Down

0 comments on commit 74736b2

Please sign in to comment.