database.js
/**
         * Toggles a heartbeat to the database in order to keep the connection alive.
         * If the heartbeat is already running, it will be quit.
         */
Toggles a heartbeat to the database in order to keep the connection alive.
If the heartbeat is already running, it will be quit.
Toggles a heartbeat to the database in order to keep the connection alive . If the heartbeat is already running it will be quit .
toggleHeartbeat() {
            if (this.heartbeatInterval) {
                clearInterval(this.heartbeatInterval);
            } else {
                this.heartbeatInterval = setInterval(() => {
                    this.connection.query('SELECT 1');
                }, 60000);
            }
        }
toggleHeartbeat ( ) { if ( this . heartbeatInterval ) { clearInterval ( this . heartbeatInterval ) ; } else { this . heartbeatInterval = setInterval ( ( ) => { this . connection . query ( 'SELECT 1' ) ; } , 60000 ) ; } }
Toggles a heartbeat to the database in order to keep the connection alive.
Toggles a heartbeat to the database in order to keep the connection alive .