Skip to content

Knowre-Dev/swint-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swint-task

Greenkeeper badge Batch task manager for Swint. Proceeds the tasks one-by-one, respectively.

Warning: This is not the final draft yet, so do not use this until its official version is launched

Installation

$ npm install --save swint-task

Usage

var tasks = [
		{
			func: function(option, callback) {
				// task 1
				callback(null, true);
			}
		},
		{
			func: function(option, callback) {
				// task 2
				callback(null, option.value); // option.value === 42
			},
			option: {
				value: 42
			}
		},
		{
			func: function(option, callback) {
				setTimeout(function() {
					// task 3
					callback(null, true);
				}, 10);
			}
		}
	];

task(tasks, function(err, res) {
	// task 1, 2, 3 is executed, respectively
});

About

Batch task manager for Swint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •