eliot icon indicating copy to clipboard operation
eliot copied to clipboard

Allow DeferredContext.addActionFinish to record the result.

Open tomprince opened this issue 9 years ago • 2 comments

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)

tomprince avatar Jun 09 '15 06:06 tomprince

Hm. Not sure addActionFinish is only place you might want to add results. Might want to add them inside callbacks too...

itamarst avatar Dec 23 '15 16:12 itamarst

Or at a minimum in between callbacks?

d = DeferredContext(...)
d.addCallback(f)
d.extractActionResults(lambda value: {"field": value.field})
d.addActionFinish()

itamarst avatar Dec 23 '15 16:12 itamarst