Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,13 @@ function stopOrRestart(action, event, format, target) {
}

if (procs && procs.length > 0) {
async.map(procs, sendAction, function (err, results) {
// If we are restarting, use a rolling-restart so that at least one process is always up, minimizing down time.
var mapAction = async.map;
if (sendAction === 'restart' || sendAction === 'restartall') {
mapAction = async.mapSeries;
}

mapAction(procs, sendAction, function (err, results) {
if (err) {
emitter.emit('error', err);
}
Expand Down