Commit 8fe4ddb3 authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sebastien Robin

When 'createNew' is requested, it'll create a new jio instance and will

automaticaly start it.
parent 5ab6b025
...@@ -529,12 +529,15 @@ ...@@ -529,12 +529,15 @@
if (this.storage) if (this.storage)
if (!jioGlobalObj.storageTypeObject[this.storage.type]) if (!jioGlobalObj.storageTypeObject[this.storage.type])
$.error('Unknown storage type "' + this.storage.type +'"'); $.error('Unknown storage type "' + this.storage.type +'"');
// start jio process
this.start();
}; };
// JIO Prototype // JIO Prototype
JioCons.prototype = { JioCons.prototype = {
start: function () { start: function () {
// Start JIO: start listening to jobs and make it ready // Start JIO: start listening to jobs and make it ready
if (this.id !== 0) return false;
// set a new jio id // set a new jio id
this.id = getNewQueueID(); this.id = getNewQueueID();
console.log (this.id); console.log (this.id);
...@@ -556,6 +559,7 @@ ...@@ -556,6 +559,7 @@
this.listener.stop(); this.listener.stop();
this.toucher.stop(); this.toucher.stop();
this.ready = false; this.ready = false;
this.id = 0;
return true; return true;
}, },
kill: function () { kill: function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment