~mna/tulip-wiki

d3d795dd22616a978efd3c516cf9c9fdd0a408f9 — Martin Angers 3 years ago dafd3fe v0.1.4-1
Update worker doc
1 files changed, 5 insertions(+), 6 deletions(-)

M pkg.worker.md
M pkg.worker.md => pkg.worker.md +5 -6
@@ 25,15 25,14 @@ The `tulip.pkg.worker` module exports the `worker` package.
* error\_handler: function = if set, called when an error occurs in
  the worker look (e.g. when trying to dequeue a batch of messages).
  The first argument is the t table used to call the dequeue App:mqueue
  function, with an added field errcount that counts the number
  of successive errors, and the second argument is the error itself.
  If the handler returns true-ish, processing continues, otherwise
  the main function returns. By default an error is raised after
  5 consecutive errors, sleeping as when no message is received
  in-between.
  function, the second argument is the error itself and the third is
  the app instance.
  By default, errors are logged and the main loop sleeps
  as if there were no results to process.
  Errors that happen while processing a message are not handled
  with this, use a handler.wrecover middleware for that.


# API Extensions

Registering this package provides the following method and field extensions.