[FIX] tooling: debug tool logged too many scheduler stops

This was caused by additional calls to flush (because of connected
components)

closes #533
This commit is contained in:
Géry Debongnie
2019-12-03 15:13:33 +01:00
parent 2b4ff7b2fd
commit 286090efca
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -107,11 +107,15 @@
let start = owl.Component.scheduler.start;
let stop = owl.Component.scheduler.stop;
owl.Component.scheduler.start = function () {
console.log(`${prefix} scheduler: start running tasks queue`);
if (!this.isRunning) {
console.log(`${prefix} scheduler: start running tasks queue`);
}
start.call(this);
};
owl.Component.scheduler.stop = function () {
console.log(`${prefix} scheduler: stop running tasks queue`);
if (this.isRunning) {
console.log(`${prefix} scheduler: stop running tasks queue`);
}
stop.call(this);
};
}