-
Notifications
You must be signed in to change notification settings - Fork 190
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
Emit signal on active change #23
Comments
Well the question at hand is how much worse will the performance be, if you call save on individual models so that the post_save handler would be triggered. What is the use case of using post_save? Is it anything that could be handled differently? |
I think adding a signal for something scalable like notifications would be potentially harmful. Over at djangorestframework-simplejwt, I considered the same problem and came to the conclusion that we could add a setting saying whether we wanted to emit a signal. I don't think a signal will be necessary though. On the one hand, if a device is being deactivated, you can receive the ids from the QuerySet API response (from #160). From DRF, override some views. And from admins, override the ModelAdmin class |
active
is being changed throughupdate()
, which does not emit a signal that I need. Would it make sense to add signal to update?Something similar to the following in https://github.com/xtrinch/fcm-django/blob/master/fcm_django/models.py#L38
The text was updated successfully, but these errors were encountered: