-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runtime-core): schedulerJob skip correctly #2834
Conversation
@edison1105,Hi,i find a problem. if (job && !job.skip) //The skip is always undefined. The button still responds properly after the skip is deleted. export function invalidateJob(job: SchedulerJob) {
const i = queue.indexOf(job)
if (i > -1) {
//queue[i].skip = true
}
} Is there a better way to deal with such situations? |
@Mr14huashao If it is already in the queue, it should not be executed repeatedly. It also works if you remove |
@edison1105 if (job && !job.skip) The job cannot be determined. It is more reasonable to exclude the problem of the af95604 |
Why is this PR still not merged? |
临时解决方法:
|
Hey @edison1105 do you have an idea for a test case? |
done! |
Size report
|
f512ba6
to
b8990d2
Compare
fix(runtime-core): schedulerJob allow to skip avoid component double update fix(runtime-core): schedulerJob allow to skip avoid component double update fix: improve test: modify test case
There's ongoing discussion about another way to solve this here: #3184 We should resolve that discussion before deciding wether to merge this PR or the other one. |
close #2768
close #2829
caused by this af95604
after
queue.splice(i,1)
ininvalidateJob
,the length ofqueue
will change, resulting in incomplete job execution influshJobs