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

created rake restart task #18965

Merged
merged 1 commit into from Feb 28, 2015
Merged

created rake restart task #18965

merged 1 commit into from Feb 28, 2015

Conversation

@hjoo
Copy link
Contributor

hjoo commented Feb 17, 2015

Created rake restart task to address issue #18876. Was uncertain if spring restart required if tmp/restart.txt will be on Spring watch list (referencing #18874).

@eileencodes
Copy link
Member

eileencodes commented Feb 17, 2015

@hjoo I think you can add some tests for this rake task in railties/test/application/rake/ or railties/test/commands/ - honestly not sure which is best. Take a look at what kind of commands are there and base your decision on that.

@hjoo hjoo force-pushed the hjoo:rake_restart branch 2 times, most recently Feb 26, 2015
@eileencodes
eileencodes reviewed Feb 26, 2015
View changes
railties/test/application/rake/restart_test.rb Outdated
assert_not_equal prev_mtime, curr_mtime
end
end

This comment has been minimized.

@eileencodes

eileencodes Feb 26, 2015 Member

@hjoo can you remove this extra line. Otherwise I think this is looking good 😄

@kaspth
kaspth reviewed Feb 26, 2015
View changes
railties/CHANGELOG.md Outdated
@@ -1,3 +1,9 @@
* Created rake restart task.

This comment has been minimized.

@kaspth

kaspth Feb 26, 2015 Member

It would be nice with an extra sentence that says something like: "Restarts your Rails app by touching the "tmp/restart.txt" file 😄

This comment has been minimized.

@eileencodes

eileencodes Feb 26, 2015 Member

👍 good call, I agree @kaspth

Fixes #18876. Rake restart touches `tmp/restart.txt` to restart
application on next request. Updated tests and documentation
accordingly.
@hjoo hjoo force-pushed the hjoo:rake_restart branch to b181297 Feb 26, 2015
eileencodes added a commit that referenced this pull request Feb 28, 2015
created rake restart task
@eileencodes eileencodes merged commit 58aecb0 into rails:master Feb 28, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hundredwatt
Copy link

hundredwatt commented Mar 2, 2015

Does this task need to depend on the :environment task? Seems like that could be dropped (ie task :restart do) for faster execution.

@rafaelfranca
Copy link
Member

rafaelfranca commented Mar 2, 2015

Yes, it can be dropped

@eileencodes
Copy link
Member

eileencodes commented Mar 2, 2015

@hjoo can you send a new PR that just does task :restart do instead of task restart: :environment do

@matthewd
Copy link
Member

matthewd commented Mar 2, 2015

task :restart do

@eileencodes
Copy link
Member

eileencodes commented Mar 2, 2015

Thanks @matthewd it's early here 😁 need moar

@hjoo
Copy link
Contributor Author

hjoo commented Mar 2, 2015

Done! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.