Skip to content

set default cap hooks in a pre-deploy task#1348

Merged
mperham merged 1 commit intosidekiq:masterfrom
dleavitt:fix-default-capistrano-hooks
Nov 17, 2013
Merged

set default cap hooks in a pre-deploy task#1348
mperham merged 1 commit intosidekiq:masterfrom
dleavitt:fix-default-capistrano-hooks

Conversation

@dleavitt
Copy link
Contributor

Issue: sidekiq default hooks are never added for cap3

Cause:
The cap3 sidekiq hooks are added based on a cap setting, the final value of which won't be available until "before deploy." Currently the check is done when the task file is loaded.

Solution:
Check and possibly add the hooks in a pre-deploy task rather than at the top level of the task file.

Issue: sidekiq default hooks are never added for cap3

Cause:
The cap3 sidekiq hooks are added based on a cap setting, the final value of which won't be available until "before deploy." Currently the check is done when the task file is loaded.

Solution:
Check and possibly add the hooks in a pre-deploy task rather than at the top level of the task file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If a deploy is rolled back, shouldn't we start Sidekiq with the old code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will. A rollback still runs the deploy:published task at the end. reverted is the equivalent of updated for rollbacks, see: https://github.com/capistrano/capistrano/blob/master/lib/capistrano/tasks/framework.rake#L48

mperham added a commit that referenced this pull request Nov 17, 2013
set default cap hooks in a pre-deploy task
@mperham mperham merged commit a65d854 into sidekiq:master Nov 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants