A Seneca.js decorator that adds a fire-and-forget method.
This is a plugin for Seneca that adds a simple
.fire(pattern[, cb]) method to
your Seneca instance. This acts in a fire-and-forget manner, so this will
swallow any errors from the act you called. The callback is optional.
- lead maintainer: Glen Keane
var seneca =seneca// A basic pattern to useseneca// Expected use!, no reply is expected, so callback can be excludedseneca// Don't actually need to worry about any error here...seneca// Firing and using the reply dataseneca// Firing, but no reply to be expectedseneca
seneca argument object/pattern, which you would expect to call any function with.
Function which can be called, taking two arguments:
- Error: This is any error which was generated when calling the pattern (eg. act_not_found).
- Result: This is the result returned by the
senecafunction for the pattern you pass in.
This module follows the general Senecajs org contribution guidelines, and encourages open participation. If you feel you can help in any way, or discover any Issues, feel free to create an issue or create a pull request!
If you wish to read more on our guidelines, feel free to
Copyright Glen Keane and other contributors 2016, Licensed under MIT.