Permalink
Browse files

add waiting time to debug output

  • Loading branch information...
kcivey committed Nov 15, 2013
1 parent 4f828c6 commit 2391d6d954e9510edfe059c37ef91ea3bf2a5db5
Showing with 3 additions and 1 deletion.
  1. +3 −1 server.js
View
@@ -55,7 +55,8 @@ app.get(/^(\/.+)\.([^.\/]+)(\.jpe?g)$/i, function (req, res) {
var task = {
rawFile: rawFile,
convertOptions: convertOptions,
- convertedFile: convertedFile
+ convertedFile: convertedFile,
+ times: times
};
times.downloaded = Date.now();
console.log('%s written', rawFile);
@@ -142,6 +143,7 @@ function getTempFilename(options) {
function doConversion(task, callback) {
var args = convertArguments.concat(task.rawFile, task.convertOptions, task.convertedFile),
execOptions = {timeout: convertTimeout};
+ task.times.waiting = Date.now();
console.log(convertCommand, args.join(' '));
execFile(convertCommand, args, execOptions, function (err, stdout, stderr) {
if (err) {

0 comments on commit 2391d6d

Please sign in to comment.