would it be possible to use the

would it be possible to use the waitForEvent to make a some sort of debounce?
4 Replies
Olga Silva
Olga Silva2mo ago
Hey, it really depends on your requirements. You could implement a debounce-like behavior by looping with waitForEvent — if the timeout elapses, that means no new events arrived and you can go on. That said, it’s probably cleaner to handle it with a worker or a DO (if you need persistence) with setTimeouts.
fredviken
fredvikenOP2mo ago
yeah maybe using a DO is better. i guess building it inside the workflow would rely on the instance id as the debounce key. which would become very restrictive. do you know if there are any plans to add some kind of concurrency/deboucning options for workflows? similar to tools like inngest/trigger. or would orchestration be considered outside the scope of cf workflows?
Olga Silva
Olga Silva2mo ago
This is something we're considering! Thank you for your feedback
fredviken
fredvikenOP2mo ago
Exciting!

Did you find this page helpful?