Use pickle protocol through rubypython
Hi,
I'm currently using graphite in for a Ruby on Rails app, we would like to pass batches of metrics to carbon via the pickle protocol, but knowing it's on python, I decided to use the RubyPython gateway. Here's my code,
RubyPytho
stats= "[(path,
cPickle = RubyPython.import 'cPickle'
serialize
struct = RubyPython.import 'struct'
length = serialized_
puts length
header = struct.pack("!L", length)
message = header + serialized_stats
socket.
RubyPytho
socket.close
Everything works fine, no errors in the ruby side, but in the carbon-cache server I get this error
25/05/2012 12:42:05 :: [console] Unhandled Error
Traceback (most recent call last):
File "/usr/local/
return callWithContext
File "/usr/local/
return context.
File "/usr/local/
return self.currentCon
File "/usr/local/
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/local/
why = getattr(selectable, method)()
File "/usr/local/
rval = self.protocol.
File "/usr/local/
self.
File "/opt/graphite/
for (metric, datapoint) in datapoints:
hope anyone can give me a clue to solve this
thanks!!!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Graphite Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ana Rosas
- Solved:
- Last query:
- Last reply: