mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
feat: add support for using parallel to restore apps
By using parallel, we take advantage of the fact that a server may have multiple cores, thus enabling restores to complete faster. Refs #2463
This commit is contained in:
@@ -7,6 +7,12 @@ source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
ps_restore_cmd() {
|
||||
declare desc="starts all apps with DOKKU_APP_RESTORE not set to 0 via command line"
|
||||
local cmd="ps:restore"
|
||||
|
||||
if which parallel > /dev/null 2>&1; then
|
||||
dokku_apps | parallel dokku ps:start
|
||||
return
|
||||
fi
|
||||
|
||||
for app in $(dokku_apps); do
|
||||
local DOKKU_APP_RESTORE=$(config_get "$app" DOKKU_APP_RESTORE || true)
|
||||
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user