feat: refs #5846 Added eventScheduler function #4

Merged
guillermo merged 4 commits from 5846-eventScheduler into master 2024-03-21 06:46:25 +00:00
1 changed files with 8 additions and 0 deletions
Showing only changes of commit dfa1db1432 - Show all commits

View File

@ -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 = {