Code review comment for lp://staging/~ev/daisy/optional_s3

Revision history for this message
Martin Pitt (pitti) wrote :

When I run this, I get

==> /var/log/retracer-amd64.log <==
2012-12-13 13:16:02,678:INFO:root:Processing 39f8843a-4527-11e2-90c4-fa163e402e99
Traceback (most recent call last):
  File "/var/retracer/daisy/process_core.py", line 543, in <module>
    main()
  File "/var/retracer/daisy/process_core.py", line 540, in main
    retracer.listen()
  File "/var/retracer/daisy/process_core.py", line 143, in listen
    self.run_forever(channel, self.callback, queue=retrace)
  File "/var/retracer/daisy/process_core.py", line 156, in run_forever
    channel.wait()
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 97, in wait
    return self.dispatch_method(method_sig, args, content)
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 117, in dispatch_method
    return amqp_method(self, args, content)
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 2060, in _basic_deliver
    func(msg)
  File "/var/retracer/daisy/process_core.py", line 283, in callback
    path = write_s3_bucket_to_disk(self, oops_id)
NameError: global name 'write_s3_bucket_to_disk' is not defined

I easily get around that with

- path = write_s3_bucket_to_disk(self, oops_id)
+ path = self.write_s3_bucket_to_disk(oops_id)

but then it crashes on

  File "/var/retracer/daisy/process_core.py", line 283, in callback
    path = self.write_s3_bucket_to_disk(oops_id)
  File "/var/retracer/daisy/process_core.py", line 267, in write_s3_bucket_to_disk
    key = bucket.get_key(msg.body)
NameError: global name 'msg' is not defined

This is less trivial, I'm not sure where to get msg from (from a 2 second look).

A visual inspection of the code structure looks good to me, though. It's good to keep both implementations side by side for a while.

review: Needs Fixing

« Back to merge proposal