praekelt/vumi-go — pull request #842 by jerith (2014-01-27 08:07:56+00:00)
Title: harden sequential send worker against deleted conversations.

This caused the scheduler to fail.

```
2014-01-19 02:00:46+0000 [HTTP11ClientProtocol,client] Trying to find conversation 'fd1b54e658644425841ac391a37c8050' by batch_id.
2014-01-19 02:00:46+0000 [HTTP11ClientProtocol,client] u'Cannot find batch for batch_id 1249b7548d464198b9b10cbb0c3b6415'
2014-01-19 02:00:46+0000 [HTTP11ClientProtocol,client] Unhandled error in Deferred:
2014-01-19 02:00:46+0000 [HTTP11ClientProtocol,client] Unhandled Error
Traceback (most recent call last):
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback
self._startRunCallbacks(result)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
self._runCallbacks()
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1155, in gotResult
_inlineCallbacks(r, g, deferred)
--- ---
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "/var/praekelt/vumi-go/go/apps/sequential_send/vumi_app.py", line 125, in poll_conversations
then, now, [c.key for c in conversations]))
exceptions.AttributeError: 'NoneType' object has no attribute 'key'
```