File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/trigger-sdk/src/v3 Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @trigger.dev/sdk " : patch
3
+ ---
4
+
5
+ Use global setTimeout to ensure cross-runtime support
Original file line number Diff line number Diff line change 8
8
RetrieveRunResponse ,
9
9
apiClientManager ,
10
10
} from "@trigger.dev/core/v3" ;
11
- import { setTimeout } from "timers/promises" ;
12
11
import { Prettify , RunHandle , apiClientMissingError } from "./shared" ;
13
12
14
13
export type RetrieveRunResult < TOutput > = Prettify <
@@ -98,6 +97,6 @@ async function poll<TRunHandle extends RunHandle<any> | string>(
98
97
return run ;
99
98
}
100
99
101
- await setTimeout ( Math . max ( options ?. pollIntervalMs ?? 5000 , 1000 ) ) ;
100
+ await new Promise ( ( resolve ) => setTimeout ( resolve , options ?. pollIntervalMs ?? 1000 ) ) ;
102
101
}
103
102
}
You can’t perform that action at this time.
0 commit comments