feat: refs #5846 Added eventScheduler function

This commit is contained in:
Guillermo Bonet 2024-03-05 07:44:07 +01:00
parent c02eed742d
commit dfa1db1432
1 changed files with 8 additions and 0 deletions

View File

@ -225,6 +225,7 @@ class Push extends Command {
// Apply versions
this.emit('applyingVersions');
await this.eventScheduler(false);
let nVersions = 0;
let nChanges = 0;
@ -342,6 +343,7 @@ class Push extends Command {
await conn.query('FLUSH PRIVILEGES');
await conn.query(`DROP TEMPORARY TABLE tProcsPriv`);
}
await this.eventScheduler(true);
}
for (const change of changes)
@ -533,6 +535,12 @@ class Push extends Command {
return a.path.localeCompare(b.path);
});
}
async eventScheduler(isActive) {
await conn.query(
`SET GLOBAL event_scheduler = ${isActive ? 'ON' : 'OFF'}`
);
}
}
const typeMap = {