fix(plugin-workflow): fix schedule duplicated triggering in multi-apps (#2313)
This commit is contained in:
parent
d8befa75c6
commit
df4e6de4dc
@ -424,6 +424,10 @@ export default class ScheduleTrigger extends Trigger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
if (this.plugin.app.name !== 'main') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -435,7 +439,7 @@ export default class ScheduleTrigger extends Trigger {
|
|||||||
this.run,
|
this.run,
|
||||||
// NOTE:
|
// NOTE:
|
||||||
// try to align to system time on each second starts,
|
// try to align to system time on each second starts,
|
||||||
// after at least 1 second initialized for anything to get ready.
|
// after at least 1 second initialized for everything to get ready.
|
||||||
// so jobs in 2 seconds will be missed at first start.
|
// so jobs in 2 seconds will be missed at first start.
|
||||||
1_000 - now.getMilliseconds(),
|
1_000 - now.getMilliseconds(),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user