fix: correctly namespace the lock file
This commit is contained in:
@@ -96,7 +96,7 @@ func destroyApp(appName string) error {
|
|||||||
|
|
||||||
// returns the lock path
|
// returns the lock path
|
||||||
func getLockPath(appName string) string {
|
func getLockPath(appName string) string {
|
||||||
return fmt.Sprintf("%v/.deploy.lock", common.GetDataDirectory(appName))
|
return fmt.Sprintf("%v/.deploy.lock", common.GetAppDataDirectory("apps", appName))
|
||||||
}
|
}
|
||||||
|
|
||||||
// creates an app if allowed
|
// creates an app if allowed
|
||||||
|
|||||||
@@ -437,19 +437,19 @@ parse_args() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
--quiet)
|
--quiet)
|
||||||
export DOKKU_QUIET_OUTPUT=1
|
export DOKKU_QUIET_OUTPUT=1
|
||||||
;;
|
;;
|
||||||
--trace)
|
--trace)
|
||||||
export DOKKU_TRACE=1
|
export DOKKU_TRACE=1
|
||||||
;;
|
;;
|
||||||
--force)
|
--force)
|
||||||
export DOKKU_APPS_FORCE_DELETE=1
|
export DOKKU_APPS_FORCE_DELETE=1
|
||||||
;;
|
;;
|
||||||
--app)
|
--app)
|
||||||
export DOKKU_APP_NAME=${args[$next_index]}
|
export DOKKU_APP_NAME=${args[$next_index]}
|
||||||
skip=true
|
skip=true
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$skip" == "true" ]]; then
|
if [[ "$skip" == "true" ]]; then
|
||||||
@@ -929,7 +929,7 @@ acquire_app_deploy_lock() {
|
|||||||
declare desc="acquire advisory lock for use in deploys"
|
declare desc="acquire advisory lock for use in deploys"
|
||||||
local APP="$1"
|
local APP="$1"
|
||||||
local LOCK_TYPE="${2:-waiting}"
|
local LOCK_TYPE="${2:-waiting}"
|
||||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/$APP/.deploy.lock"
|
local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/apps/$APP/.deploy.lock"
|
||||||
local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..."
|
local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..."
|
||||||
local LOCK_FAILED_MSG="$APP currently has a deploy lock in place. Exiting..."
|
local LOCK_FAILED_MSG="$APP currently has a deploy lock in place. Exiting..."
|
||||||
|
|
||||||
@@ -939,7 +939,7 @@ acquire_app_deploy_lock() {
|
|||||||
release_app_deploy_lock() {
|
release_app_deploy_lock() {
|
||||||
declare desc="release advisory lock used in deploys"
|
declare desc="release advisory lock used in deploys"
|
||||||
local APP="$1"
|
local APP="$1"
|
||||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/$APP/.deploy.lock"
|
local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/apps/$APP/.deploy.lock"
|
||||||
|
|
||||||
release_advisory_lock "$APP_DEPLOY_LOCK_FILE"
|
release_advisory_lock "$APP_DEPLOY_LOCK_FILE"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user