A future implementation of the Rundown-Workers SDK for JavaScript/TypeScript.
When building the Node.js SDK, follow these design goals:
import rw from 'rundown-workers';
// Register a worker function
rw.queue({ name: 'email-sender', maxRetries: 5 }, async (payload) => {
console.log('Sending email:', payload);
await sendMail(payload);
});
// Start workers
rw.run();- Async/Await: The SDK must support asynchronous handlers and properly await them.
- Abortion/Timeout: Use
AbortControlleror a custom Promise timer to enforce the tasktimeout. - Concurrency: In Node.js, multiple queues can be polled within the same event loop without separate threads, but each
rw.run()should manage its own intervals. - Error Handling: Automatically catch unhandled rejection/exceptions within the handler and report to
/fail.
We're looking for contributors to help build out the Node.js SDK based on the Engine API Specification.