Skip to content

Run any rake task on remote#209

Closed
stoivo wants to merge 1 commit into
capistrano:masterfrom
stoivo:master
Closed

Run any rake task on remote#209
stoivo wants to merge 1 commit into
capistrano:masterfrom
stoivo:master

Conversation

@stoivo

@stoivo stoivo commented Sep 19, 2017

Copy link
Copy Markdown

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

stoivo commented Sep 19, 2017

Copy link
Copy Markdown
Author

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

@capistrano-bot

capistrano-bot commented Sep 19, 2017

Copy link
Copy Markdown

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

stoivo commented Oct 6, 2017

Copy link
Copy Markdown
Author

@kirs @mattbrictson

@will-in-wi

Copy link
Copy Markdown
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

stoivo commented Oct 8, 2017

Copy link
Copy Markdown
Author

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

stoivo commented Oct 8, 2017

Copy link
Copy Markdown
Author

Cookbook idea might not be a bad idea

@will-in-wi

Copy link
Copy Markdown
Contributor

The cookbook has been merged. Closing this pull request.

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

stoivo commented Oct 16, 2017

Copy link
Copy Markdown
Author

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