3 steps
14 days free
no card
Start a trial
A trial is fourteen days on the Works plan and does not ask for a card. This page is the whole of the setup. There is no console step, no YAML, and nothing to install on a machine you own.
step 1
Install the package
Node 20 or later. There are packages for Python and Go with the same three calls in them.
npm install @bidewell/node step 2
Declare a queue and its policy
The policy is the second argument and it is the only decision on this page. Four are
available and two of those are controls; if you do not pass one you get
exponential.
import { queue } from '@bidewell/node';
export const settle = queue('settle', { retries: 'exponential' },
async (job) => {
await charge(job.data.invoice, { key: job.idempotencyKey });
}); step 3
Enqueue
The key is in the environment as BIDEWELL_KEY.
A job that has no way of accepting an idempotency key is refused at enqueue rather than
at the second attempt, which is the only place refusing it is useful.
await settle.enqueue({ invoice: 'in_4192' });
if it does not
When it does not work
The first thing to check is the key, and the second is whether the queue name in the dashboard matches the string in the first argument. If neither of those is it, ring us during a UK working day or write and we will read it the same day.