enforcing pickle to use copy of dict while serializing extra context of the notification#53
enforcing pickle to use copy of dict while serializing extra context of the notification#53jumpjam wants to merge 2 commits intotschellenbach:masterfrom
Conversation
…of the notification
|
Which feed class and with which storage backend did you run into this problem? Thanks for contributing, we really appreciate it. |
|
Part of the problem seems to be that: Removes by value instead of by key. Not sure why this is. |
|
Think we could easily use http://redis.io/commands/zremrangebyscore over there |
|
Hi, I have used current redis version with following notification class: class NotificationFeedly(RedisNotificationFeed): Debugged down to zrem which returned 0 as value is not found. I also agree using rembyscore which might be a reliable and faster solution. Thank you |
|
Solution #1191a64 doesnt resolve a case with nested dicts. Recursive algorithm will. |
This fixes a type of notification extra context pickling in our case (remove was failing as key not found).
Example that satisfies the condition:
import pickle
x = {'order_number': 'X', 'deal_url': 'J'}
pickle.dumps(x)
pickle.dumps(pickle.loads(pickle.dumps(x)))
pickle.dumps(pickle.loads(pickle.dumps(pickle.loads(pickle.dumps(x)))))
Where 1 and 3 are same but second is different.