这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@stesie
Copy link
Contributor

@stesie stesie commented Mar 28, 2016

ps_restartall_cmd (aka dokku ps:restartall) calls the ps_restart function from a loop, so if ps_restart does an exit 0 if it finds an app that hasn't been deployed (in my case due to dokku ps:scale web=0), then it exits the ps:restartall loop early and hence just doesn't restart all the apps.

ps_restartall_cmd calls ps_restart from a loop, if ps_restart exits because of a not deployed app further apps might not be restarted.
if is_deployed "$APP"; then
release_and_deploy "$APP" "$IMAGE_TAG"
else
echo "App $APP has not been deployed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we return 1 here at least?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. After all IMHO that even isn't an error, there's just nothing to be done and then echo just shows a log message. All current callers (ps/subcommands/restartall, nginx-vhosts/proxy-disable and nginx-vhosts/proxy-enable) don't need the information. So YAGNI.

Even worse, if we return 1 here we would have to change all callers (since they set -e they then would exit 1)

@josegonzalez
Copy link
Member

@michaelshobbs beep beep you're a jeep.

@michaelshobbs michaelshobbs merged commit 6c51115 into dokku:master Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants