Created
February 6, 2019 21:20
-
-
Save dustydecapod/c6e5cfbc0647dbece564fa18a6de6797 to your computer and use it in GitHub Desktop.
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
import cacheops, sys | |
from django import setup | |
setup() | |
from redis import Redis | |
from apps.feature_flags.backends.smart_redis import SmartRedisDict | |
from django.conf import settings | |
storage = Redis(**settings.FEATURE_FLAG_DB['connection']) | |
redis_dict = SmartRedisDict('gutter', storage) | |
encoded = {x:redis_dict.encoding.encode(y) for x,y in redis_dict.items()} | |
import json | |
f = open("/root/%s.dump" % sys.argv[1], 'w') | |
json.dump(encoded, f) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment