Closed VAS closed 10 years ago
It'll work if you leave out the input: false
from the second job.
a.js
var nodeio = require('node.io');
exports.job = new nodeio.Job({
input: false,
run: function () {
this.emit('foo');
}
});
b.js
var nodeio = require('node.io');
exports.job = new nodeio.Job({
run: function (input) {
this.emit(input + 'bar');
}
});
Result:
$ node.io --silent a | node.io b
foobar
OK: Job complete
Thanks @chriso , sorry to see nodeio go, it has helped us a ton.
It is often mentioned in issues and documentation that node.io is designed to pipe easily with stdin/stdout.
However, when trying to pipe 2 different jobs, like the following: Job1
And job2
using the following command line prompt:
Makes job2 start immediately with a
null
input value.