notifier-server
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -56,6 +56,8 @@ var mailer, | ||
var log = debug( "notifier-server:script:" + filename ); | ||
var queue = async.queue(function spawn(commit, callback) { | ||
var queue = async.queue(function spawn(eventData, callback) { | ||
var commit = eventData.commit; | ||
log( "spawn", commit ); | ||
var output = "", | ||
exit = -1; | ||
exit = -1, | ||
started = Date.now(); | ||
@@ -80,5 +82,5 @@ var process = proc.spawn( directory + "/" + filename, [ commit ] ); | ||
} | ||
subject += "Deployment: " + filename + " " + commit; | ||
subject += "Deployment: " + filename + " " + commit + " " + ((Date.now() - started)/1000).toFixed(0) + "s"; | ||
mailer( subject, output + "\nExit Code: " + exit ); | ||
callback( null, { output: output, exit: exit }); | ||
callback( null, { subject: subject, filename: filename, eventData: eventData, output: output, exit: exit, time: Date.now() - started, started: started }); | ||
}); | ||
@@ -98,3 +100,3 @@ }); | ||
return function( data ) { | ||
return function( data, callback ) { | ||
if ( invalidSHA.test( data.commit ) ) { | ||
@@ -106,3 +108,7 @@ log( "Bad Request", data ); | ||
log( "queue", data.commit ); | ||
queue.push( data.commit ); | ||
if (callback) { | ||
queue.push( data, callback ); | ||
} else { | ||
queue.push( data ); | ||
} | ||
}; | ||
@@ -109,0 +115,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "A simple git-notifier server", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/gnarf/node-notifier-server", | ||
@@ -8,0 +8,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6462
8
164