Skip to content

Commit

Permalink
feat: support recursive auto-upload (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
drochetti authored Apr 15, 2024
1 parent dfeb868 commit 9262814
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Thumbs.db

# Next.js
.next
*.local
*.local
.vercel
2 changes: 1 addition & 1 deletion libs/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fal-ai/serverless-client",
"description": "The fal serverless JS/TS client",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions libs/client/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ export const storageImpl: StorageSupport = {
if (isPlainObject(value)) {
return [key, await storageImpl.transformInput(value)];
}
if (Array.isArray(value)) {
return [key, await Promise.all(value.map(storageImpl.transformInput))];
}
return [key, value] as KeyValuePair;
});
const results = await Promise.all(promises);
Expand Down
5 changes: 2 additions & 3 deletions libs/client/src/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class FalStream<Input, Output> {
reject(error);
});
});
this.start();
this.start().catch(this.handleError);
}

private start = async () => {
Expand Down Expand Up @@ -145,8 +145,7 @@ class FalStream<Input, Output> {
this.emit(
'error',
new ApiError({
message:
'Event stream timed out after 15 seconds with no messages.',
message: `Event stream timed out after ${(timeout / 1000).toFixed(0)} seconds with no messages.`,
status: 408,
})
);
Expand Down

0 comments on commit 9262814

Please sign in to comment.