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

celery-shoot

v5.0.1

Published

Celery client for Node (Forked from node-celery)

Readme

Celery client for Node.js

Celery is an asynchronous task/job queue based on distributed message passing. celery-shoot allows to queue tasks from Node.js. If you are new to Celery check out http://celeryproject.org/

Differences with node-celery

  1. This library is now based on amqplib, instead of node-amqp.

  2. EventEmitter based code has been removed; only promises are available.

  3. Support for the Redis Backend has been removed.

    • I will accept pull-requests if you would like to re-add support.
  4. Primary Queue / Exchange declaration has been removed. This means if you start up celery-shoot on a fresh RabbitMQ vhost, you'll get an error.

    To get around this, just start a celery worker on that vhost first.

    • Why? If you declared your Queues/Exchanges from node, you need to mirror the celery settings exactly. If you don't, you need to stop both node & celery, delete the queues, restart both services (with the correct settings, or with the celery worker first). This was a big trap, that often came up deploying to production so we're better off without it!

Usage

Simple example, included as examples/hello-world.js:

import { withClient } from 'celery-shoot';

withClient('amqp://guest:guest@localhost:5672//', {}, async client => {
  const result = await client.call({
    name: 'tasks.error',
    args: ['Hello World'],
  });
  console.log('tasks.echo response:', result);
});

ETA

The ETA (estimated time of arrival) lets you set a specific date and time that is the earliest time at which your task will be executed:

import { withClient } from 'celery-shoot';

withClient('amqp://guest:guest@localhost:5672//', {}, async client => {
  await client.call({
    name: 'tasks.send_email',
    kwargs: {
      to: '[email protected]',
      title: 'sample email',
    },
    eta: 30 * 1000,
    ignoreResult: true,
  });
  console.log('tasks.send_email sent');
});

Expiration

The expires argument defines an optional expiry time, a specific date and time using Date:

import { withClient } from 'celery-shoot';

withClient('amqp://guest:guest@localhost:5672//', {}, async client => {
  await client.call({
    name: 'tasks.sleep',
    args: [2 * 60 * 60],
    expires: 1000, // in 1s
  });
});

Routing

The simplest way to route tasks to different queues is using options.routes:

You can also configure custom routers, similar to http://celery.readthedocs.org/en/latest/userguide/routing.html#routers

import { withClient } from 'celery-shoot';


const routes = [
  {
    'tasks.send_mail': {
      queue: 'mail',
    },
  },
  (task, args, kwargs) => {
    if(task === 'myapp.tasks.compress_video'){
      return {
        'exchange': 'video',
        'routingKey': 'video.compress'
      }
    }
    return null;
  }
];

withClient('amqp://guest:guest@localhost:5672//', { routes }, async client => {
  await client.call({
    name: 'tasks.send_email',
    kwargs: {
      to: '[email protected]',
      title: 'sample email',
    },
    ignoreResult: true,
  });
  await client.call({
    name: 'tasks.calculate_rating',
    kwargs: {
      item: 1345,
    },
  });
});
var myRouter = 
Client({
  routes: [myRouter]
});