Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Simple system for writing Node.js worker scripts that runs jobs from a beanstalkd queue.

Notifications You must be signed in to change notification settings

benlund/node-beanstalk-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beanstalk Worker for Node.js
============================

version 0.2.0

Simple BeanstalkWorker and BeanstalkWorkerCluster objects for connecting to a beanstalkd queue and running jobs.

requires node-beanstalk-worker

Try it:

In one console:
$ node test/produce_test_jobs.js

In another:
$ node bin/worker.js

===

NPM:

$ npm install beanstalk_worker 

 -> Creates nbworker as an executable symlink to bin/worker.js (Will also install the client lib)

You can pass this script the path to a config file to specify how many client connections to open, where the handlers for jobs are, and so forth:

$ nbworker conf/example.js


$ cat conf/example.js
module.exports = {

  workers: 3,
  server: '127.0.0.1:11300',
  tubes: ['external'],
  ignore_default: true,
  handlers: ['../handlers/test', '../handlers/http_request']

};
console.log('Loaded conf/example.js config');

About

Simple system for writing Node.js worker scripts that runs jobs from a beanstalkd queue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published