diff --git a/lib/tools/phantomas/phantomasWrapper.js b/lib/tools/phantomas/phantomasWrapper.js index 308c0c5..21af510 100644 --- a/lib/tools/phantomas/phantomasWrapper.js +++ b/lib/tools/phantomas/phantomasWrapper.js @@ -31,7 +31,7 @@ var PhantomasWrapper = function() { var options = { // Cusomizable options - 'timeout': task.options.timeout || 60, + 'timeout': task.options.timeout || 120, 'user-agent': (task.options.device === 'desktop') ? 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) YLT Chrome/85.0.4183.121 Safari/537.36' : null, 'tablet': (task.options.device === 'tablet'), 'phone': (task.options.device === 'phone'), @@ -79,44 +79,6 @@ var PhantomasWrapper = function() { deferred.reject('Phantomas failed: ' + res.message); }); - /*var process = phantomas(task.url, options, function(err, json, results) { - var errorCode = err ? parseInt(err.message, 10) : null; - - debug('Returning from Phantomas with error %s', errorCode); - - // Adding some YellowLabTools errors here - if (json && json.metrics && (!json.metrics.javascriptExecutionTree || !json.offenders.javascriptExecutionTree)) { - errorCode = 1001; - } - - if (!errorCode && (!json || !json.metrics)) { - errorCode = 1002; - } - - // Don't cancel test if it is a timeout and we've got some results - if (errorCode === 252 && json) { - debug('Timeout after ' + options.timeout + ' seconds. But it\'s not a problem, the test is valid.'); - errorCode = null; - } - - if (errorCode) { - debug('Attempt failed. Error code ' + errorCode); - } - - }, function(err, json) { - - if (err) { - debug('All ' + triesNumber + ' attemps failed for the test'); - deferred.reject(err); - - } else { - - deferred.resolve(json); - - } - }); - */ - return deferred.promise; }; }; diff --git a/package.json b/package.json index 9162731..c562173 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "meow": "5.0.0", "minimize": "2.2.0", "parse-color": "1.0.0", - "phantomas": "git://github.com/macbre/phantomas.git#phantomas-v2", + "phantomas": "git://github.com/macbre/phantomas.git#devel", "ps-node": "0.1.6", "q": "1.5.1", "request": "2.88.0",