Skip to content

Commit

Permalink
prevent crashing - ghettoshimfixthingyjig
Browse files Browse the repository at this point in the history
  • Loading branch information
Contra committed Sep 14, 2011
1 parent fde897e commit 9fa3540
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions scripts/start_hosted_apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ var apps = [],
bad = "✖";

// Bad idea
console.log = function () {}; //Commenting this out so the debugging from ../lib/app doesn't display
//console.log = function () {}; //Commenting this out so the debugging from ../lib/app doesn't display

// Another bad idea but we don't want this thing crashing
process.on('uncaughtException', function(err) {
util.print('UNCAUGHT ERROR! '.red + err);
});

var next = function () {
if (apps.length) {
var len = apps.length;
Expand Down Expand Up @@ -116,8 +122,8 @@ var next = function () {
util.print(' [' + '!!'.yellow.bold + ']\n');
}
//Let the process fire up and daemonize before starting the next one
//setTimeout(next, 500);
next();
setTimeout(next, 500);
//next();
},
end: function (data) {
if (data instanceof Object) {
Expand All @@ -131,9 +137,9 @@ var next = function () {
g++;
util.print(' [' + '!!'.yellow.bold + ']\n');
}
next();
//next();
//Let the process fire up and daemonize before starting the next one
//setTimeout(next, 500);
setTimeout(next, 500);
}
});
} catch (err) {
Expand Down

0 comments on commit 9fa3540

Please sign in to comment.