Browse Source

Update package.json and readme

master
Harish.K 11 years ago
parent
commit
8a5a4fb3d5
  1. 8
      README.md
  2. 12
      package.json

8
README.md

@ -1,11 +1,11 @@
node-job-manager
================
JobManager is a multipurpose, flexible, asynchronous task runner class written in Node.js.
JobManager is a multipurpose, flexible, asynchronous queue manager class written in Nodejs. Queue is processed using given workers. It is possible to change concurrency and load bulk tasks at run time. See demo for better understanding
Overview
--------
### A JobManager instance need the following informations to get started. they are
### A JobManager instance need the following informations to get started. They are,
* ```workers```: An array of worker instances that are used to do the work.
* ```onLoadMore```: A function that tells how to retrieve tasks that need to processed with workers.
* ```work```: a function that does the real task. It is called with following syntax: worker( task, worker, cb ). task and worker are are belongs to the available tasks and workers. cb is the callback function that should be called after work is done.
@ -29,10 +29,10 @@ Usage
```javascript
var JobManager = require('job-manager').JobManager;
var jm = new JobManager({ configuration options});
jm.tasks = tasks;
jm.workers = workers;
jm.onLoadMore = function(cb){// code; if( !tasks ){ this.endReached = true; } cb()}
jm.work = function(task, worker,cb){ // worker.process( task, cb ); }
jm.onError = function( err, task, worker){ log( err, task, worker ); }
jm.onError = function( err, task, worker){ // log( err, task, worker ); }
jm.onStopped = function(){ // log('Finished'); cb(); }
jm.start();
// jm.stop();

12
package.json

@ -1,7 +1,7 @@
{
"name": "job-manager",
"version": "0.0.3",
"description": "A task manager class wich runs tasks with given workers, running N tasks at a time, automatically load works, pause resume etc",
"version": "0.0.4",
"description": "A queue manager class which process tasks with given workers, with adjustable concurrency. It can automatically load tasks, pause resume etc",
"main": "src/JobManager.js",
"scripts": {
"test": "mocha -R spec test/*.spec.js"
@ -13,7 +13,13 @@
"keywords": [
"job-manager",
"asynchronous",
"parallel"
"parallel",
"queue",
"async",
"job",
"task",
"concurrency",
"concurrent"
],
"author": {
"name": "Harish.K",

Loading…
Cancel
Save