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

Trigger events only when transaction is committed #369

Closed
leplatrem opened this issue Jan 14, 2016 · 2 comments
Closed

Trigger events only when transaction is committed #369

leplatrem opened this issue Jan 14, 2016 · 2 comments

Comments

@leplatrem
Copy link
Contributor

Currently notifications are triggered when the resource method is executed.

For batch requests, if one of the sub-requests fails, the whole batched is rolledback. However the events are still triggered.

The events should be triggered when the batch transaction is committed.

This will also affect performance since only one event per collection will be triggered for a batch request.

@tarekziade
Copy link
Contributor

Maybe It might worth adding in that case specific events before the data is saved into the DB, so some custom code can alter the data and maybe even reject the change ?

@leplatrem
Copy link
Contributor Author

adding in that case specific events before the data is saved into the DB

Good idea, but it's another scope IMO. Please open an other issue to describe what you have in mind!
For naming ideas : https://docs.djangoproject.com/es/1.9/ref/signals/ :)

@leplatrem leplatrem self-assigned this Feb 29, 2016
leplatrem added a commit that referenced this issue Mar 7, 2016
Upgrade to Cliquet 3 (fixes #345, fixes #fixes #369, fixes #421, fixes #424, fixes #433, fixes #434, fixes #461)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants