Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#4604] Add a method and rake task to clear and update all TimeEntry …
…cost caches
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
namespace :rate_plugin do | ||
namespace :cache do | ||
desc "Update Time Entry cost caches" | ||
desc "Update Time Entry cost caches for Time Entries without a cost" | ||
task :update_cost_cache => :environment do | ||
Rate.update_all_time_entries_with_missing_cost | ||
end | ||
|
||
desc "Clear and update all Time Entry cost caches" | ||
task :refresh_cost_cache => :environment do | ||
Rate.update_all_time_entries_to_refresh_cache | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters