0.4.2 • Published 10 months ago

celery-client v0.4.2

Weekly downloads
163
License
MIT
Repository
github
Last release
10 months ago

celery-client

NPM version Downloads

A Celery client for node.

Supported Brokers and Backends.

  • Redis

Quick Example:

var celery = require('celery-client');

var broker  = new celery.RedisHandler('redis://:password@localhost:6379/0');
var backend = new celery.RedisHandler('redis://:password@localhost:6379/1');
var celeryClient = new celery.Client(broker, backend);

var args   = [1, 2, 3];
var kwargs = {'key': 'value'};
var taskOptions = {
  eta      : Date.now() + 3000,
  retries  : 3,
  timeLimit: 5,
}
celeryClient.putTask('your-celery-project.task', args, kwargs, taskOptions,
  function(err, taskId) {
    console.log('Task >', taskId);
  },
  function(err, result) {
    console.log('Result >', result);
    process.exit();
  }
);

Task option list

  • id
    • Task ID
  • eta
    • Task ETA
  • expires
    • Task expires
  • retries
    • Task retry times
  • expires
    • Task expires
  • timeLimit
    • Task time limit (in seconds)
  • softTimeLimit
    • Task time limit (soft, in seconds)
  • origin
    • Task sender name
  • priority
    • Task priority
  • queue
    • Target queue

Install:

npm install celery-client

TODO

  • RabbitMQ support

License

MIT

0.4.1

11 months ago

0.4.2

10 months ago

0.4.0

2 years ago

0.3.0

3 years ago

0.2.0

4 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago