Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: background uploads #71

Closed
wants to merge 1 commit into from
Closed

feat: background uploads #71

wants to merge 1 commit into from

Conversation

isidentical
Copy link
Collaborator

Not a big fan of doing this opt-in (since it is an obscure feature) but currently we don't have a way of running finalizations in fal, which means you can't use this with SDK for example (because this will still be uploading stuff even after the execution is complete in which case our scheduler will terminate thinking there is nothing left). This is an advanced thing we can only enable for our production APIs at the moment.

@isidentical isidentical marked this pull request as ready for review January 27, 2024 23:44
Comment on lines +95 to +96
if future in self.uploads:
self.uploads.remove(future)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ATL: why the if? if it's for race conditions, shouldn't we do a better locking mechanism or handle KeyError exception?

@isidentical
Copy link
Collaborator Author

actually this is not ideal in the current form because if you return a url that isn't uploaded yet, the UI will fail to render it in the fal's REST storage service (unlike the CDN, which actually blocks the user until the file is ready).

@isidentical isidentical closed this Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants