Exemple #1
0
func apiForceRemoveLocks() (int, string) {
	err := models.ForceRemoveLock(safeZkConn, globalEnv.ProductName())
	if err != nil {
		log.Warning(errors.ErrorStack(err))
		return 500, err.Error()
	}
	return jsonRetSucc()
}
Exemple #2
0
func apiForceRemoveLocks() (int, string) {
	err := models.ForceRemoveLock(safeZkConn, globalEnv.ProductName())
	if err != nil {
		log.ErrorErrorf(err, "force remove lock failed")
		return 500, err.Error()
	}
	return jsonRetSucc()
}
Exemple #3
0
func apiForceRemoveLocks() (int, string) {
	conn := CreateZkConn()
	defer conn.Close()
	err := models.ForceRemoveLock(conn, globalEnv.ProductName())
	if err != nil {
		log.Warning(errors.ErrorStack(err))
		return 500, err.Error()
	}
	return jsonRetSucc()
}
Exemple #4
0
func runRemoveLock() error {
	log.Info("removing lock...")
	zkLock.Unlock()
	return errors.Trace(models.ForceRemoveLock(zkConn, productName))
}