Day 2 of trying Appwrite Functions 🙂
I have a function which monitors when a document is created or updated and then if media files information in a document field shows that thumbnails for media were not generated, it triggers thumbnail generation, stores them in Storage and then updates media files information (IDs in Storage).
I noticed that first run of the function triggers another run, which is while it's fast (3ms) can add up on large volumes of requests I think, so I'm wondering if there is a mechanism which allows to avoid triggering of an event when calling document update API from a function which uses server API or otherwise.
Even if I check x-appwrite-user-id for example (end function if it's empty) it still runs the function which has sharp/libvips & ffmpeg, so kinda expensive I think.
Thanks.
BTW, I noticed a small bug in preview endpoint - it doesn't consider orientation of photos (previews are sideways when photos are displayed correctly in browsers/viewers which consider orientation) - I think appwrite uses sharp/libvips based on API parameter values for the endpoint, if so a simple additional .rotate() call without parameters when generating preview should fix this issue
Recommended threads
- Functions not executing after usage rese...
Hi team, Last month my project hit 100% usage and functions stopped working (expected). Now the new month has started and usage has reset, requests are going ...
- Functions never end and always fail (sta...
Hi ! I'm using Appwrite Cloud Pro and function execution from appwrite website is KO. Deploying starter function template, execution is always Failed and the ...
- Provider error when creating a function ...