改进了一下watcher的调用逻辑
This commit is contained in:
parent
9e40ca4002
commit
e4fd026e03
|
|
@ -158,8 +158,10 @@ class AppLoader extends types_1.AppLoader {
|
||||||
dontCollect: true,
|
dontCollect: true,
|
||||||
blockTrigger: true,
|
blockTrigger: true,
|
||||||
});
|
});
|
||||||
const result = await fn(context, rows);
|
if (rows.length > 0) {
|
||||||
console.log(`执行了watcher【${w.name}】,结果是:`, result);
|
const result = await fn(context, rows);
|
||||||
|
console.log(`执行了watcher【${w.name}】,结果是:`, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await context.commit();
|
await context.commit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,8 +199,10 @@ export class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt extends Backe
|
||||||
blockTrigger: true,
|
blockTrigger: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const result = await fn(context, rows);
|
if (rows.length > 0) {
|
||||||
console.log(`执行了watcher【${w.name}】,结果是:`, result);
|
const result = await fn(context, rows);
|
||||||
|
console.log(`执行了watcher【${w.name}】,结果是:`, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await context.commit();
|
await context.commit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue