How to use the lockfile.unlock function in lockfile

To help you get started, we’ve selected a few lockfile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github manifoldco / torus-cli / cli / lib / util / lock.js View on Github external
return new Promise(function (resolve, reject) {
    var lockPath = getLockPath(file);

    /* eslint-disable consistent-return */
    lockfile.unlock(lockPath, function (err) {
      if (err) {
        return reject(err);
      }

      resolve();
    });
  });
};
github OPERANDOH2020 / PlusPrivacy / servers / coreServer / autolib / swarmAnalytics.js View on Github external
fs.appendFile(analyticsFile,temp,function (err,result){
                if(err){
                    logs =temp+logs;
                    num_rows +=currentNrOfRows
                }
                lockFile.unlock(analyticsFile + ".lock", function (err) {
                    if (err) {
                        console.error("Analytics error on unlocking!", err);
                    }
                });
            });
        }
github monaca / monaca-lib / src / monaca.js View on Github external
var unlock = function() {
            lockfile.unlock(lockFile, function(error) {
              if (error) {
                console.error(error);
              }
            });
          };
github rjanicek / bos / scripts / bos.js View on Github external
store.close = function close(returnError) {
			jsonpatch.unobserve(store.data, observer);

			lockFile.unlock(storePath + LOCK_FILE_EXTENSION, function (error) {
				if (error) {
					error.stacktrace = new Error().stack;
					store.emit('error', error);
					if (returnError) { returnError(error); } else { throw error; }
					return;
				}

				store.emit('closed');

				returnError && returnError();
			});
		};
github flatironinstitute / mountainlab-js / mlproc / safedatabase.js View on Github external
return new Promise(function(resolve2,reject2) {
							lockfile.unlock(lock_fname,function(err) {
								if (err) {
									reject2(err);
									return;
								}
								resolve2();
							});
						});
					}
github rjanicek / bos / scripts / bos-core.js View on Github external
}, function (error, results) {
		lockFile.unlock(mutexPath, function (unlockError) {
			if (unlockError) {
				returnErrorAndObject(unlockError);
				return;
			}
			returnErrorAndObject(error, results.applyPatches);
		});		
	});
};
github GUI / uas-parser / lib / updater.js View on Github external
finish: function(error, cache) {
    lockFile.unlock(this.cacheLockPath, function(error) {
      this.updateCallback(error, cache);
    }.bind(this));
  },
github rjanicek / bos / scripts / index.js View on Github external
store.close = function close(returnError) {
				
				jsonpatch.unobserve(store.data, observer);

				lockFile.unlock(path + LOCK_FILE_EXTENSION, function (error) {
					if (error) {
						if (returnError) { returnError(error); } else { throw error; }
						return;
					}
					returnError && returnError();
				});
			};
github angelozerr / tern.java / eclipse / tern.eclipse.ide.server.nodejs.embed.linux.gtk.x86 / nodejs / node-v0.10.22-linux-x86 / lib / node_modules / npm / lib / cache.js View on Github external
function unlock (u, cb) {
  var lf = lockFileName(u)
  if (!myLocks[lf]) return process.nextTick(cb)
  myLocks[lf] = false
  lockFile.unlock(lockFileName(u), cb)
}
github marklagendijk / WinLess / WinLess / node_modules / npm / lib / cache.js View on Github external
function unlock (u, cb) {
  var lf = lockFileName(u)
  if (!myLocks[lf]) return process.nextTick(cb)
  myLocks[lf] = false
  lockFile.unlock(lockFileName(u), cb)
}

lockfile

A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.

ISC
Latest version published 7 years ago

Package Health Score

55 / 100
Full package analysis

Popular lockfile functions