-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use JSONAttribute instead of MapAttribute for the Event model. Dispat…
…ch event_post_save. Update sample stream event source data in tests.
- Loading branch information
Showing
9 changed files
with
73 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
from esser.signals.decorators import receiver | ||
from esser.signals import event_pre_save, event_received | ||
from esser.signals import event_pre_save, event_received, event_post_save | ||
from esser.handlers import LambdaHandler | ||
from items.commands import UpdatePrice | ||
|
||
|
||
@receiver(event_pre_save, sender=UpdatePrice) | ||
def check_price_update(sender, **kwargs): | ||
pass | ||
print('Event pre save handled: %s' % kwargs) | ||
|
||
|
||
@receiver(event_received, sender=LambdaHandler) | ||
def do_something(sender, **kwargs): | ||
pass | ||
print('Command received handled: %s' % kwargs) | ||
|
||
|
||
@receiver(event_post_save) | ||
def handle_event_saved(sender, **kwargs): | ||
print('Post saved handled: %s' % kwargs['event'].as_dict()) |
This file contains 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
File renamed without changes.
This file contains 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