eliot
eliot copied to clipboard
Allow DeferredContext.addActionFinish to record the result.
Perhaps by specifying the key to log to?
This is particularly useful, since there isn't an easy way to call a function in a callback, without disturbing the response. (https://twistedmatrix.com/trac/ticket/6292)
Hm. Not sure addActionFinish
is only place you might want to add results. Might want to add them inside callbacks too...
Or at a minimum in between callbacks?
d = DeferredContext(...)
d.addCallback(f)
d.extractActionResults(lambda value: {"field": value.field})
d.addActionFinish()