diff options
author | drebs <drebs@riseup.net> | 2017-10-23 10:21:21 -0200 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-10-23 10:38:02 -0200 |
commit | 33e30feb2d7cedb1aecbde2f339b40f72128a585 (patch) | |
tree | 1de5fb8dd4858dd24b1b0185c7a9aa0a954684ac /docs/reference/incoming_box.rst | |
parent | b3bf0be478060a3acdf01c924819212553775f8c (diff) |
[doc] small fixes in documentation
Diffstat (limited to 'docs/reference/incoming_box.rst')
-rw-r--r-- | docs/reference/incoming_box.rst | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/docs/reference/incoming_box.rst b/docs/reference/incoming_box.rst index 04d3084c..920d03bf 100644 --- a/docs/reference/incoming_box.rst +++ b/docs/reference/incoming_box.rst @@ -230,22 +230,20 @@ registered Trusted Application Consumers. process, attention SHOULD be payed to the callbacks not blocking the main event loop. -Example of a Trusted Application Client Consumer: - -```python -@implementer(interfaces.IIncomingBoxConsumer) -class MyConsumer(object): - def __init__(self): - self.name = 'My Consumer' - - def process(self, item, item_id, encrypted=True): - cleartext = my_custom_decrypt(item) if encrypted else item - processed_parts = my_custom_processing(item) - return defer.succeed(processed_parts) - - def save(self, parts, item_id): - return defer.gatherResults([db.save(part) for part in parts]) -``` +Example of a Trusted Application Client Consumer:: + + @implementer(interfaces.IIncomingBoxConsumer) + class MyConsumer(object): + def __init__(self): + self.name = 'My Consumer' + + def process(self, item, item_id, encrypted=True): + cleartext = my_custom_decrypt(item) if encrypted else item + processed_parts = my_custom_processing(item) + return defer.succeed(processed_parts) + + def save(self, parts, item_id): + return defer.gatherResults([db.save(part) for part in parts]) Future Features |