Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy:restart task not executing #925

Closed
paulwalker opened this issue Feb 6, 2014 · 7 comments
Closed

deploy:restart task not executing #925

paulwalker opened this issue Feb 6, 2014 · 7 comments

Comments

@paulwalker
Copy link

Using capistrano 3.1.0 and for whatever reason the deploy:restart task is not executing. I do have a custom one defined in the :deploy namespace.

  task :restart do
    on roles(:web), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

The last few output lines of the deployment I get:

 INFO Keeping 3 of 4 deployed releases on stage-api.yapert.com
 INFO [7680beb5] Running /usr/bin/env rm -rf /yapert/yapert-api/releases/20140206204344 on stage-api.yapert.com
 INFO [7680beb5] Finished in 1.361 seconds with exit status 0 (successful).
 INFO [ffd9ca54] Running /usr/bin/env echo "Branch develop (at 881fa74) deployed as release 20140206215946 by paul; " >> /yapert/yapert-api/revisions.log on stage-api.yapert.com
 INFO [ffd9ca54] Finished in 0.673 seconds with exit status 0 (successful).

It seems to run deploy:cleanup and I have explicitly wired that task with after :finishing, 'deploy:cleanup'

but then it just exits without running invoking deploy:restart. What could be the issue?

@leehambley
Copy link
Member

Closing because I’m not sure this is an issue, if you are convinced that this is really a bug, please feel free to re-open the issue and add more information (your versions (Ruby, Cap, etc), your Capfile, your logs, and relevant sections out of your Gemfile)

Otherwise support is done via the mailing list (https://groups.google.com/forum/#!forum/capistrano) or at StackOverflow (http://stackoverflow.com/questions/tagged/capistrano) with questions tagged capistrano.

@leehambley
Copy link
Member

Also, perhaps you missed the release notes when you upgraded: https://github.com/capistrano/capistrano/releases/tag/v3.1.0

@flamontagne
Copy link

Ahh... i had the same problem and oops I skipped reading the release notes. Here is the relevant part:

Breaking changes: * deploy:restart task is no longer run by default. From this version, developers who restart the app on each deploy need to declare it in their deploy flow (eg after 'deploy:publishing', 'deploy:restart').

@leehambley
Copy link
Member

The change was made because not all frameworks (php is a good area to look)
have a concept of restarting, and in some enterprise setups, the restart is
done with filesystem events and dbus when relevant configs change.

Sent from my Nexus 4.
On 19 Mar 2014 22:05, "François Lamontagne" notifications@github.com
wrote:

Ahh... i had the same problem and oops I skipped reading the release
notes. Here is the relevant part:

Breaking changes: * deploy:restart task is no longer run by default.
From this version, developers who restart the app on each deploy need to
declare it in their deploy flow (eg after 'deploy:publishing',
'deploy:restart').


Reply to this email directly or view it on GitHubhttps://github.com//issues/925#issuecomment-38106633
.

@flamontagne
Copy link

Makes total sense, thanks!

@brodock
Copy link

brodock commented Mar 31, 2014

@leehambley
Copy link
Member

It's also on GH we'd appreciate a pull request for any improvements you can
see.

Sent from my Nexus 4.
On 31 Mar 2014 17:00, "Gabriel Mazetto" notifications@github.com wrote:

http://capistranorb.com/documentation/getting-started/flow/ should be
updated


Reply to this email directly or view it on GitHubhttps://github.com//issues/925#issuecomment-39098424
.

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

No branches or pull requests

4 participants