2.0.5 • Published 9 years ago

osr-master v2.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

###OSR-CHILD###

####How to use####

npm install osr-master

####Example#### #####index.js#####

var OsrMaster = require("../");

var master = new OsrMaster();

var child = master.fork(__dirname+"/demo.js");

// child.send(OsrMaster.CODE.CONFIG.CODE,{
	// appid:"appid...",
	// appkey:"appkey...",
// });

child.send("config",{
	appid:"appid",
	appkey:"appkey"
});

#####demo.js#####

var Process = require("../").Process;
var CODE = require("../").CODE;
var Quant = Process.extends({
	onStart:function(){
		var _this = this;
		this.on("config",function(config){
			console.log("..config",config);
		});
		setTimeout(function(){
			_this.exit();
		},5000);
	}
});

module.exports = exports = new Quant;

####Console####

..config { appid: 'appid', appkey: 'appkey' }
2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago