bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-02-28 04:16:55 +03:00
parent 3b4aefffd1
commit be6ab4dfca
3 changed files with 10 additions and 4 deletions

View File

@ -2703,6 +2703,9 @@ function(title, func){
// thus making the final behaviour unpredictable.
//
//
// NOTE: promise results are .flat()-tened, thus if it is needed to return
// a list of arrays then one must wrap the handler return value in an
// array...
// NOTE: sync-mode actions do not externally log anything, basic progress
// logging is handled by the queue/task which is not created in sync
// mode.

View File

@ -375,6 +375,9 @@ var ExampleActions = actions.Actions({
console.log('\t\tSKIP', item)
return runner.SKIP }
// NOTE: the handler's return value list is .flat()-end
// so if one needs to return a array the it must be
// wrapped in an array...
return item+1 }),
// handle inputs (async/queue)...
function(item, ...args){

View File

@ -288,7 +288,7 @@ var SharpActions = actions.Actions({
if(!image || !['image', null, undefined]
.includes(image.type)){
return runner.SKIP }
return [
return [[
// source...
this.getImagePath(gid),
// target...
@ -307,7 +307,7 @@ var SharpActions = actions.Actions({
flipped: image.flipped,
// crop...
},
] }),
]] }),
// do the actual resizing (global queue)...
function([source, to, image={}], size, _, options={}){
// handle skipped items -- source, to and image are undefined...
@ -625,7 +625,7 @@ var SharpActions = actions.Actions({
var base = base_path
|| img.base_path
|| this.location.path
return [
return [[
gid,
// source...
this.getImagePath(gid),
@ -643,7 +643,7 @@ var SharpActions = actions.Actions({
pathlib.join(base, name)),
] }),
index_dir,
]}),
]]}),
// generate the previews...
// NOTE: this is competely isolated...
// XXX args/logger is wrong here...