feat: refs #5846 Added eventScheduler function #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "5846-eventScheduler"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -225,6 +225,7 @@ class Push extends Command {
// Apply versions
this.emit('applyingVersions');
await this.eventScheduler(false);
Estaría millor en la funció
run()
de este mateix fitxer, on es fa el GET/RELEASE_LOCK.Comprobar si la variable global está a true, y si lo está hacerlo, de lo contrario, no hacer.
Hacer cambios propuestos
@ -134,2 +134,4 @@
opts.commit = true;
const [[scheduler]] = await conn.query(`SELECT @@event_scheduler state`);
if (scheduler.state === 'ON') await eventScheduler(false);
Mover a despues del GET_LOCK
@ -159,2 +168,4 @@
async function releaseLock() {
await conn.query(`DO RELEASE_LOCK('myt_push')`);
if (scheduler.state === 'ON') await eventScheduler(true);
Mover antes del RELEASE_LOCK