Created
June 4, 2015 15:29
-
-
Save imtapps/93345270edd1f0b2e6c8 to your computer and use it in GitHub Desktop.
Decode celery data from djkombu_messages table
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 script excepts a data file to contain a single base64 encoded | |
string - which is the payload from djkombu from the djkombu_message table. | |
""" | |
import base64 | |
import cPickle as pickle | |
def decode(line_number): | |
with open('data5.txt', 'r') as f: | |
for i, line in enumerate(f): | |
message = base64.b64decode(line) | |
# print pickle.loads(message) | |
with open('message_pid.txt', 'wb') as x: | |
x.write(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment