npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

izi-queue

v0.1.0

Published

A minimal, reliable, database-backed job queue for Node.js inspired by Oban

Readme

izi-queue

A minimal, reliable, database-backed job queue for Node.js inspired by Oban.

Why izi-queue?

  • No extra infrastructure - Use your existing PostgreSQL, SQLite, or MySQL database
  • ACID guarantees - Jobs are inserted transactionally with your business data
  • Simple API - Define workers, insert jobs, done
  • TypeScript-first - Full type safety and excellent DX

Installation

npm install izi-queue

Install the database driver you need:

# PostgreSQL
npm install pg

# SQLite
npm install better-sqlite3

# MySQL
npm install mysql2

Quick Start

import { IziQueue, Worker, WorkerResult, createSQLiteAdapter } from 'izi-queue';
import Database from 'better-sqlite3';

// 1. Define a worker
class SendEmailWorker extends Worker {
  name = 'send_email';

  async perform(args: { to: string; subject: string }) {
    console.log(`Sending email to ${args.to}: ${args.subject}`);
    return WorkerResult.ok();
  }
}

// 2. Create the queue
const db = new Database('jobs.db');
const queue = new IziQueue({
  database: createSQLiteAdapter(db),
  workers: [new SendEmailWorker()],
  queues: ['default'],
});

// 3. Run migrations and start
await queue.start();

// 4. Insert jobs
await queue.insert('send_email', {
  to: '[email protected]',
  subject: 'Welcome!',
});

Features

Job Scheduling

// Run immediately
await queue.insert('send_email', args);

// Schedule for later
await queue.insert('send_email', args, {
  scheduledAt: new Date(Date.now() + 3600000), // 1 hour
});

Retries with Backoff

class MyWorker extends Worker {
  name = 'my_worker';
  maxAttempts = 5; // Retry up to 5 times

  async perform(args) {
    // Automatic exponential backoff on failure
    return WorkerResult.error('Something went wrong');
  }
}

Priority Queues

await queue.insert('urgent_task', args, { priority: 0 }); // High priority
await queue.insert('background_task', args, { priority: 10 }); // Low priority

Unique Jobs

await queue.insert('send_digest', args, {
  unique: {
    fields: ['worker', 'args'],
    period: 3600, // Only one per hour
  },
});

Plugins

import { LifelinePlugin, PrunerPlugin } from 'izi-queue';

const queue = new IziQueue({
  // ...
  plugins: [
    new LifelinePlugin({ rescueAfter: 300 }), // Rescue stuck jobs
    new PrunerPlugin({ maxAge: 86400 }), // Prune old jobs
  ],
});

Worker Results

async perform(args) {
  // Success
  return WorkerResult.ok();
  return WorkerResult.ok({ processed: 100 });

  // Retry later
  return WorkerResult.error('Temporary failure');

  // Don't retry
  return WorkerResult.discard('Invalid data');

  // Reschedule
  return WorkerResult.snooze(60); // Try again in 60 seconds
}

Database Support

| Database | Adapter | Status | | ---------- | ------------------------ | ------ | | PostgreSQL | createPostgresAdapter | ✅ | | SQLite | createSQLiteAdapter | ✅ | | MySQL | createMySQLAdapter | ✅ |

License

MIT