batch/batch.manager.js
function run() {
        var startTime = (new Date()).getTime();

        // parse the command line using the commander object
        processCommandLine();

        // leverage the middleware to initialize all our services, adapters, etc. (i.e. connect to mongo, etc.)
        mwServiceInit.init({ container: 'batch' })
            .then(function () {
                var app = pancakes.cook(casing.camelCase(commander.app) + 'Batch');
                return app.run(commander);
            })
            .then(function () {
                var endTime = (new Date()).getTime();
                var diffTime = (endTime - startTime) / 1000;
                log.info(commander.app + ' complete (' + diffTime + 's)');
                process.exit(0);
            })
            .catch(function (err) {
                log.error(err);
                process.exit(1);
            });
    }
function run() {
        var startTime = (new Date()).getTime();

        // parse the command line using the commander object
        processCommandLine();

        // leverage the middleware to initialize all our services, adapters, etc. (i.e. connect to mongo, etc.)
        mwServiceInit.init({ container: 'batch' })
            .then(function () {
                var app = pancakes.cook(casing.camelCase(commander.app) + 'Batch');
                return app.run(commander);
            })
            .then(function () {
                var endTime = (new Date()).getTime();
                var diffTime = (endTime - startTime) / 1000;
                log.info(commander.app + ' complete (' + diffTime + 's)');
                process.exit(0);
            })
            .catch(function (err) {
                log.error(err);
                process.exit(1);
            });
    }
function run ( ) { var startTime = ( new Date ( ) ) . getTime ( ) ; // parse the command line using the commander object processCommandLine ( ) ; // leverage the middleware to initialize all our services, adapters, etc. (i.e. connect to mongo, etc.) mwServiceInit . init ( { container : 'batch' } ) . then ( function ( ) { var app = pancakes . cook ( casing . camelCase ( commander . app ) + 'Batch' ) ; return app . run ( commander ) ; } ) . then ( function ( ) { var endTime = ( new Date ( ) ) . getTime ( ) ; var diffTime = ( endTime - startTime ) / 1000 ; log . info ( commander . app + ' complete (' + diffTime + 's)' ) ; process . exit ( 0 ) ; } ) . catch ( function ( err ) { log . error ( err ) ; process . exit ( 1 ) ; } ) ; }
Run a particular batch program
Run a particular batch program