sample/cf-nodejs-shoutboard/web-express.js
function synchronize() {
    if (syncPointer != -1) {
        log.logMessage("verbose", "redis synchronization!");
        var syncMessage = {};
        syncMessage.data = messages.splice(syncPointer, messages.length - syncPointer);
        setTimeout(function () {
            pub.publish("message", JSON.stringify(syncMessage));
        }, 200);
        syncPointer = -1;
    }
}
function synchronize() {
    if (syncPointer != -1) {
        log.logMessage("verbose", "redis synchronization!");
        var syncMessage = {};
        syncMessage.data = messages.splice(syncPointer, messages.length - syncPointer);
        setTimeout(function () {
            pub.publish("message", JSON.stringify(syncMessage));
        }, 200);
        syncPointer = -1;
    }
}
function synchronize ( ) { if ( syncPointer != - 1 ) { log . logMessage ( "verbose" , "redis synchronization!" ) ; var syncMessage = { } ; syncMessage . data = messages . splice ( syncPointer , messages . length - syncPointer ) ; setTimeout ( function ( ) { pub . publish ( "message" , JSON . stringify ( syncMessage ) ) ; } , 200 ) ; syncPointer = - 1 ; } }
synchronizes messages after redis reconnect between server Instances
synchronizes messages after redis reconnect between server Instances