File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change
1
+ declare global {
2
+ namespace GraphileWorker {
3
+ interface Tasks {
4
+ latency : { id : number } ;
5
+ }
6
+ }
7
+ }
8
+
9
+ export type Foo = "Foo" ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import assert from "assert";
3
3
import {
4
4
CompiledSharedOptions ,
5
5
EnhancedWithPgClient ,
6
- PromiseOrDirect ,
7
6
WorkerPoolOptions ,
8
7
} from "." ;
9
8
import { MINUTE , SECOND } from "./cronConstants" ;
Original file line number Diff line number Diff line change @@ -658,10 +658,11 @@ export function _runTaskList(
658
658
get worker ( ) {
659
659
return concurrency === 1 ? this . _workers [ 0 ] ?? null : null ;
660
660
} ,
661
- nudge ( this : WorkerPool , n : number ) {
661
+ nudge ( this : WorkerPool , count : number ) {
662
662
if ( localQueue ) {
663
663
localQueue . pulse ( ) ;
664
664
} else {
665
+ let n = count ;
665
666
// Nudge up to `n` workers
666
667
this . _workers . some ( ( worker ) => worker . nudge ( ) && -- n <= 0 ) ;
667
668
}
You can’t perform that action at this time.
0 commit comments