File tree 2 files changed +7
-2
lines changed
packages/core/src/v3/runMetadata 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @trigger.dev/sdk " : patch
3
+ ---
4
+
5
+ Fix for waiting for realtime streams to finish
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ export class StandardMetadataManager implements RunMetadataManager {
250
250
return streamInstance ;
251
251
} catch ( error ) {
252
252
// Clean up metadata key if stream creation fails
253
- this . deleteKey ( `$$stream. ${ key } ` ) ;
253
+ this . removeFromKey ( `$$streams` , key ) ;
254
254
throw error ;
255
255
}
256
256
}
@@ -265,7 +265,7 @@ export class StandardMetadataManager implements RunMetadataManager {
265
265
return ;
266
266
}
267
267
268
- const promises = Array . from ( this . activeStreams . values ( ) ) ;
268
+ const promises = Array . from ( this . activeStreams . values ( ) ) . map ( ( stream ) => stream . wait ( ) ) ;
269
269
270
270
try {
271
271
await Promise . race ( [
You can’t perform that action at this time.
0 commit comments