feat: refs #5846 Added eventScheduler function
This commit is contained in:
parent
c02eed742d
commit
dfa1db1432
|
@ -225,6 +225,7 @@ class Push extends Command {
|
||||||
// Apply versions
|
// Apply versions
|
||||||
|
|
||||||
this.emit('applyingVersions');
|
this.emit('applyingVersions');
|
||||||
|
await this.eventScheduler(false);
|
||||||
|
|
||||||
let nVersions = 0;
|
let nVersions = 0;
|
||||||
let nChanges = 0;
|
let nChanges = 0;
|
||||||
|
@ -342,6 +343,7 @@ class Push extends Command {
|
||||||
await conn.query('FLUSH PRIVILEGES');
|
await conn.query('FLUSH PRIVILEGES');
|
||||||
await conn.query(`DROP TEMPORARY TABLE tProcsPriv`);
|
await conn.query(`DROP TEMPORARY TABLE tProcsPriv`);
|
||||||
}
|
}
|
||||||
|
await this.eventScheduler(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const change of changes)
|
for (const change of changes)
|
||||||
|
@ -533,6 +535,12 @@ class Push extends Command {
|
||||||
return a.path.localeCompare(b.path);
|
return a.path.localeCompare(b.path);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async eventScheduler(isActive) {
|
||||||
|
await conn.query(
|
||||||
|
`SET GLOBAL event_scheduler = ${isActive ? 'ON' : 'OFF'}`
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const typeMap = {
|
const typeMap = {
|
||||||
|
|
Loading…
Reference in New Issue