Class: RebuildCommandCacheJob
- Inherits:
-
Object
- Object
- RebuildCommandCacheJob
- Includes:
- SuckerPunch::Job
- Defined in:
- lib/esm/jobs/rebuild_command_cache_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(cache) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/esm/jobs/rebuild_command_cache_job.rb', line 6 def perform(cache) ESM::Database.with_connection do # Remove all the caches since this will recache ESM::CommandDetail.in_batches(of: 10_000).delete_all # Store the caches in the DB so the website can read this data ESM::CommandDetail.import(cache) end end |