Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created May 14, 2014 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayleedev/2e00cc811040b80802b3 to your computer and use it in GitHub Desktop.
Save bayleedev/2e00cc811040b80802b3 to your computer and use it in GitHub Desktop.
lastWeek = new Date('2014-05-07');
db.git_queue.find({notified_build: {$ne: null}, finished_build: {$ne: null}}).forEach(function(el) {
if (new Date(el.notified_build) > lastWeek) {
total_ms = new Date(el.finished_build) - new Date(el.notified_build);
total_secs = total_ms / 1000;
total_mins = total_secs / 60;
print(total_mins);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment