Skip to content

Instantly share code, notes, and snippets.

@imtapps
Created June 4, 2015 15:29
Show Gist options
  • Save imtapps/93345270edd1f0b2e6c8 to your computer and use it in GitHub Desktop.
Save imtapps/93345270edd1f0b2e6c8 to your computer and use it in GitHub Desktop.
Decode celery data from djkombu_messages table
"""
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