Temporarily remove queue messages

This commit is contained in:
Gaël Métais
2021-03-21 23:53:04 +00:00
parent 97099e9f65
commit d1681c3d88
2 changed files with 8 additions and 7 deletions
+5 -5
View File
@@ -29,18 +29,15 @@ var yellowLabTools = function(url, options) {
.then(function(data) {
// If a screenshot save function was provided in the options
// If a screenshot saveFunction was provided in the options
if (typeof options.saveFile === 'function') {
debug('Now optimizing screenshot...');
// Remove uneeded temp screenshot path
delete data.params.options.screenshot;
// Add the screenshot url instead
data.screenshotUrl = '/api/results/' + data.runId + '/screenshot.jpg';
// TODO: temporarily set all screenshot sizes to 600px, until we find a solution
ScreenshotHandler.findAndOptimizeScreenshot(600)
ScreenshotHandler.findAndOptimizeScreenshot(600);
.then(function(screenshotBuffer) {
debug('Screenshot optimized, now saving...');
@@ -51,6 +48,9 @@ var yellowLabTools = function(url, options) {
.then(function(response) {
debug('Screenshot saved');
debug(response);
// Add the screenshot API url
data.screenshotUrl = '/api/results/' + data.runId + '/screenshot.jpg';
})
.catch(function(err) {