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

Run any rake task on remote #209

Closed
wants to merge 1 commit into from
Closed

Conversation

stoivo
Copy link

@stoivo stoivo commented Sep 19, 2017

Our company uses rake task to migrate data.
It would be nice If capistrano-rails provided this. I check out the code and this is the smallest amount of code I could add to make it work simply. I know I could package it up and ship it as a separate gem out of I don't see how anybody would benefit from that.

Probably I should not use migration_servers always, but make it configurable?
Are you interested in adding this?

@stoivo
Copy link
Author

stoivo commented Sep 19, 2017

This would also solve #110 (rake db:rollback)

@capistrano-bot
Copy link

capistrano-bot commented Sep 19, 2017

Thanks for the PR! This project lacks automated tests, which makes reviewing and approving PRs somewhat difficult. Please make sure that your contribution has not broken backwards compatibility or introduced any risky changes.

Generated by 🚫 Danger

@stoivo
Copy link
Author

stoivo commented Oct 6, 2017

@kirs @mattbrictson

@will-in-wi
Copy link
Contributor

IMHO, building a generic system for running arbitrary rake tasks from the command line is beyond the scope of core capistrano/rails. The degree of configurability required in the long run is likely to be an issue (around picking servers, etc). The Capistrano configuration syntax is essentially already designed to do this, and if you really need arbitrary rake tasks to be run, you can add the code block in the PR.

This might be another good candidate for my "Cookbook" doc page idea… #199 (comment)

I'm entirely open to different opinions from the other Cap maintainers.

@stoivo
Copy link
Author

stoivo commented Oct 8, 2017

I to some degree agree, in our case, we have moved the code to populate new fields into rake task. These are some tasks that will only be run once. I would just add a file for our case and would probably good enough for us. I just thought that this was a common case.

Thanks for the comment 🎉

@stoivo
Copy link
Author

stoivo commented Oct 8, 2017

Cookbook idea might not be a bad idea

@will-in-wi
Copy link
Contributor

The cookbook has been merged. Closing this pull request.

@will-in-wi will-in-wi closed this Oct 12, 2017
@stoivo
Copy link
Author

stoivo commented Oct 16, 2017

Ok, cool cook book

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