#!/usr/bin/env node
var args = require('minimist')(process.argv.slice(2), {});
var run = require('../');

run.worker(args, function(err) {
  /* eslint no-console:0 */
  if (err) {
    console.error(err);
    process.exit(1);
    return;
  }
  process.exit(0);
});

#!/usr/bin/env node
var args = require('minimist')(process.argv.slice(2), {});
var run = require('../');

run.worker(args, function(err) {
  /* eslint no-console:0 */
  if (err) {
    console.error(err);
    process.exit(1);
    return;
  }
});

Fix mongo processes not being stopped
bug: Fix mongo processes not being stopped

The worker must not exit or the parent process wont be able to send `stop` that shuts down any mongo processes cleanly.
