Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var thrift = require('thrift');
var sys = require('sys');
var scheduler_thrift = require('./gen-nodejs/JobExchange.js'),
scheduler_ttypes = require('./gen-nodejs/scheduler_types.js');
var conn = thrift.createConnection('localhost', 8081),
client = thrift.createClient(scheduler_thrift, conn);
conn.on('error', function(err) {
console.error(err);
conn.destroy();
});
client.get_all(function(err, data) {
console.log(err, data);
conn.end();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.