File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/core/src/v3/runMetadata Expand file tree Collapse file tree 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 {
250250 return streamInstance ;
251251 } catch ( error ) {
252252 // Clean up metadata key if stream creation fails
253- this . deleteKey ( `$$stream. ${ key } ` ) ;
253+ this . removeFromKey ( `$$streams` , key ) ;
254254 throw error ;
255255 }
256256 }
@@ -265,7 +265,7 @@ export class StandardMetadataManager implements RunMetadataManager {
265265 return ;
266266 }
267267
268- const promises = Array . from ( this . activeStreams . values ( ) ) ;
268+ const promises = Array . from ( this . activeStreams . values ( ) ) . map ( ( stream ) => stream . wait ( ) ) ;
269269
270270 try {
271271 await Promise . race ( [
You can’t perform that action at this time.
0 commit comments