Skip to content

Commit

Permalink
Be less picky about the next queued task to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Naatan committed Apr 23, 2014
1 parent f344d58 commit 49e19e3
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,15 @@ var server = new function()

logger.info("Done deploying " + deployer.name);

// Run the job again if another deploy has
// been scheduled for this deployer
if (deployer.name in queued)
// Run queued jobs
for (var queuedDeployer in queued) break;
if (queuedDeployer)
{
delete queued[deployer.name];
deploy(deployer)
}
else
{
for (deployer in queued) break;
if (deployer)
{
delete queued[deployer.name];
deploy(deployer);
}
logger.info("Running queued job: " + queuedDeployer.name, queuedDeployer);
delete queued[queuedDeployer.name];
deploy(queuedDeployer);
}

});
});
};
Expand All @@ -217,3 +210,4 @@ var server = new function()
init();

}

0 comments on commit 49e19e3

Please sign in to comment.