Skip to content

Commit 55e27f0

Browse files
committed
Rename await to awaitOutput
1 parent 5e61761 commit 55e27f0

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

modal-js/src/function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

modal-js/src/function_call.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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. */

modal-js/src/invocation.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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
*/
2626
export 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

0 commit comments

Comments
 (0)