diff --git a/myt-push.js b/myt-push.js index 970fc7b..77c3b9c 100644 --- a/myt-push.js +++ b/myt-push.js @@ -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 = {