Skip to content

Commit

Permalink
Improve redis key for duplicate notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Aug 31, 2020
1 parent d37dd82 commit ed55bb5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions safe_transaction_service/notifications/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def __init__(self, address: Optional[str], payload: Dict[str, Any]):
self.redis_payload = self._get_redis_payload(address, payload)

def _get_redis_payload(self, address: Optional[str], payload: Dict[str, Any]):
new_payload = dict(payload)
new_payload['notification_to'] = address
return 'notifications:'.encode() + pickle.dumps(new_payload)
return f'notifications:{address}:'.encode() + pickle.dumps(payload)

def is_duplicated(self) -> bool:
"""
Expand Down

0 comments on commit ed55bb5

Please sign in to comment.