File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class Function_ {
6969 let retryCount = 0 ;
7070 while ( true ) {
7171 try {
72- return await invocation . await ( ) ;
72+ return await invocation . awaitOutput ( ) ;
7373 } catch ( err ) {
7474 if ( err instanceof InternalFailure && retryCount <= maxSystemRetries ) {
7575 await invocation . retry ( retryCount ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export class FunctionCall {
3737 const invocation = ControlPlaneInvocation . fromFunctionCallId (
3838 this . functionCallId ,
3939 ) ;
40- return invocation . await ( timeout ) ;
40+ return invocation . awaitOutput ( timeout ) ;
4141 }
4242
4343 /** Cancel a running function call. */
Original file line number Diff line number Diff line change @@ -24,12 +24,7 @@ const outputsTimeout = 55 * 1000;
2424 * For now, we support just the control plane, and will add support for the input plane soon.
2525 */
2626export interface Invocation {
27- /**
28- * Spawns the function call asynchronously.
29- * @returns A promise that resolves to the function call ID.
30- */
31- await ( ) : Promise < any > ;
32-
27+ awaitOutput ( timeout ?: number ) : Promise < any > ;
3328 retry ( retryCount : number ) : Promise < void > ;
3429}
3530
@@ -76,7 +71,7 @@ export class ControlPlaneInvocation implements Invocation {
7671 return new ControlPlaneInvocation ( functionCallId ) ;
7772 }
7873
79- async await ( timeout ?: number ) : Promise < any > {
74+ async awaitOutput ( timeout ?: number ) : Promise < any > {
8075 return await pollControlPlaneForOutput ( this . functionCallId , timeout ) ;
8176 }
8277
You can’t perform that action at this time.
0 commit comments