prankcall
Call a node.js generator with backoff and other customization
- Configure exponential backoff via node-retry options
- Call the generator just once or repeatedly based on custom logic
- Optionally define another generator to receive results
- Sleep between successful calls
- Combine with modules like:
- Observe retry events for logging
Example
Use an async
producer
to generate input for an asyncconsumer
.producer
might perform an HTTP request, whileconsumer
stores the result in a database, job queue, etc.
{ var data = ; // ... return data;} { ; return ; // {boolean}} ;
See more examples.
Installation
NPM
npm install prankcall
API
License
MIT
Tests
npm test