Created
February 24, 2014 21:30
-
-
Save ashchristopher/9197591 to your computer and use it in GitHub Desktop.
Mock out a signal receiver?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _track_event(event_name, identity_user_id, event_id, **kwargs): | |
| EventTracker.track('api', 'hook.processed', data={ | |
| 'event': event_name, | |
| 'identity_user_id': identity_user_id, | |
| 'event_id': event_id, | |
| }) | |
| @receiver(hook_event_received, dispatch_uid='hooks.models.track_event') | |
| def track_event(event_name, identity_user_id, event_id, **kwargs): | |
| """ | |
| Signal receiver that records the hook received event to our event logging file. | |
| """ | |
| _track_event(event_name, identity_user_id, event_id, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment