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

Implement Webhooks functionality to watch for execution status changes #84

Open
piotrkulpinski opened this issue Aug 7, 2023 · 2 comments
Assignees

Comments

@piotrkulpinski
Copy link

Hi,
Wouldn't it be cool if Defer.run would provide a way to set up webhooks (like Stripe does) to listen to the execution status changes via some endpoint.

This endpoint could return the usual stuff: id, state, result plus the metadata provided when invoking the function. This would allow to set a custom data like userEmail and send an email automatically once webhook is called.

Currently, I have to store the execution ID in the database, and check the getExecution method periodically in a cron job to check if the status is changed (unless there's a better way to do it).

Let me know what you think.
Thanks

@gearnode
Copy link
Member

That sounds like a great idea! I've added it to our ticket system. We need to write a specification defining the type of event, how to handle retries, which mechanism to use to secure the webhook, and how to display it on the console, etc. I'll let you know when we have more information about this feature.

@piotrkulpinski
Copy link
Author

I agree it's not a trivial feature, but definitely worth the effort as it would improve the DX of getting execution results by a lot.

Thank you for considering it!

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

No branches or pull requests

2 participants