将cache中的回调放在syncRecord之前执行,可能有影响
This commit is contained in:
parent
aaccbda3bc
commit
83cf73b5bc
|
|
@ -81,11 +81,11 @@ export class Cache extends Feature {
|
||||||
try {
|
try {
|
||||||
this.refreshing++;
|
this.refreshing++;
|
||||||
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
||||||
|
callback && callback(result, opRecords);
|
||||||
if (opRecords) {
|
if (opRecords) {
|
||||||
this.syncInner(opRecords);
|
this.syncInner(opRecords);
|
||||||
}
|
}
|
||||||
this.refreshing--;
|
this.refreshing--;
|
||||||
callback && callback(result, opRecords);
|
|
||||||
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
||||||
this.publish();
|
this.publish();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,11 @@ class Cache extends Feature_1.Feature {
|
||||||
try {
|
try {
|
||||||
this.refreshing++;
|
this.refreshing++;
|
||||||
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
||||||
|
callback && callback(result, opRecords);
|
||||||
if (opRecords) {
|
if (opRecords) {
|
||||||
this.syncInner(opRecords);
|
this.syncInner(opRecords);
|
||||||
}
|
}
|
||||||
this.refreshing--;
|
this.refreshing--;
|
||||||
callback && callback(result, opRecords);
|
|
||||||
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
||||||
this.publish();
|
this.publish();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,11 +149,11 @@ export class Cache<
|
||||||
try {
|
try {
|
||||||
this.refreshing++;
|
this.refreshing++;
|
||||||
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
||||||
|
callback && callback(result, opRecords);
|
||||||
if (opRecords) {
|
if (opRecords) {
|
||||||
this.syncInner(opRecords);
|
this.syncInner(opRecords);
|
||||||
}
|
}
|
||||||
this.refreshing--;
|
this.refreshing--;
|
||||||
callback && callback(result, opRecords);
|
|
||||||
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
||||||
this.publish();
|
this.publish();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue