server/lib/sync-lock.js
function isUserLocked(username, path, callback) {
  var key = SyncLock.generateKey(username);
  redis.hget(key, path, function(err, value) {
    if(err) {
      log.error(err, 'Error getting redis lock key %s.', key);
      return callback(err);
    }

    callback(null, !!value);
  });
}
function isUserLocked(username, path, callback) {
  var key = SyncLock.generateKey(username);
  redis.hget(key, path, function(err, value) {
    if(err) {
      log.error(err, 'Error getting redis lock key %s.', key);
      return callback(err);
    }

    callback(null, !!value);
  });
}
function isUserLocked ( username , path , callback ) { var key = SyncLock . generateKey ( username ) ; redis . hget ( key , path , function ( err , value ) { if ( err ) { log . error ( err , 'Error getting redis lock key %s.' , key ) ; return callback ( err ) ; } callback ( null , ! ! value ) ; } ) ; }
Check to see if a lock is held for the given username.
Check to see if a lock is held for the given username .