function configureRegions() {
    app.regions.addListener('new', persistModel);
    app.regions.addListener('update', persistModel);
    app.regions.addListener('removed', function(key) {

      redisClient.hdel(REGIONKEY, key, function(err) {
        
        if(err) {
          app.logger.error('Could not remove Region ' + key);
      } else {
          app.logger.info('Removed Region ' + key);
        }

      });

    });
  }
/**
   * register event-listener for regions
   */
register event-listener for regions
register event - listener for regions
function configureRegions() {
    app.regions.addListener('new', persistModel);
    app.regions.addListener('update', persistModel);
    app.regions.addListener('removed', function(key) {
      redisClient.hdel(REGIONKEY, key, function(err) {
        if(err) {
          app.logger.error('Could not remove Region ' + key);
      } else {
          app.logger.info('Removed Region ' + key);
        }
      });
    });
  }
function configureRegions ( ) { app . regions . addListener ( 'new' , persistModel ) ; app . regions . addListener ( 'update' , persistModel ) ; app . regions . addListener ( 'removed' , function ( key ) { redisClient . hdel ( REGIONKEY , key , function ( err ) { if ( err ) { app . logger . error ( 'Could not remove Region ' + key ) ; } else { app . logger . info ( 'Removed Region ' + key ) ; } } ) ; } ) ; }
register event-listener for regions
register event - listener for regions