replicate / zoo

🦓 Zoo — Image Playground
https://zoo.replicate.dev
Apache License 2.0
319 stars 110 forks source link

Only save predictions on completion #66

Closed aron closed 9 months ago

aron commented 9 months ago

We now only store the prediction if it succeeds/fails. This reduces the amount of bandwidth we consume in the application when polling as there's nothing in the db we only return a placeholder.

As far as I can tell the only user visible result this will have is that predictions will not appear in the user list until they have completed.

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
zoo ✅ Ready (Inspect) Visit Preview Dec 8, 2023 2:49pm
aron commented 9 months ago

@cbh123 I've tested this on the branch it seems to work. If we run into issues we can easily revert. The /memories tab is currently timing out. We'll need indexes or to truncate the predictions table to make this work again.