Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/76466


Change subject: Perform saving when adding new subscriptions atomically
......................................................................

Perform saving when adding new subscriptions atomically

Change-Id: I8e6dcfa02f319fd0ea104f1e0ceccab64540b55f
---
M src/subscriptions.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/gerrit-to-redis 
refs/changes/66/76466/1

diff --git a/src/subscriptions.py b/src/subscriptions.py
index ea5876a..2e00ac9 100644
--- a/src/subscriptions.py
+++ b/src/subscriptions.py
@@ -27,8 +27,8 @@
     return PREFIX + "_" + '.'.join(key_parts)
 
 def add_subscription(args):
-    red.sadd(make_key(CLIENTS_KEY), args.key)
-    red.save() # We don't want to lose client lists do we
+    # Save these explicitly, to avoid them from getting lost
+    red.pipeline().sadd(make_key(CLIENTS_KEY), args.key).save().execute()
     logging.info('Added key %s' % args.key)
 
 def list_subscriptions(args):

-- 
To view, visit https://gerrit.wikimedia.org/r/76466
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e6dcfa02f319fd0ea104f1e0ceccab64540b55f
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/gerrit-to-redis
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to