Class: Pu::Lite::MaintenanceGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pu::Lite::MaintenanceGenerator
- Defined in:
- lib/generators/pu/lite/maintenance/maintenance_generator.rb
Constant Summary
Constants included from PlutoniumGenerators::Concerns::ConfiguresRecurring
PlutoniumGenerators::Concerns::ConfiguresRecurring::ENV_KEYS
Instance Method Summary collapse
Methods included from PlutoniumGenerators::Generator
derive_association_name, find_shared_namespace, included
Methods included from PlutoniumGenerators::Concerns::Logger
#debug, #error, #exception, #info, #success, #warn
Methods included from PlutoniumGenerators::Concerns::Config
Instance Method Details
#start ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/generators/pu/lite/maintenance/maintenance_generator.rb', line 18 def start template "app/jobs/sqlite_maintenance_job.rb" if gem_in_bundle?("solid_queue") unless add_recurring_tasks(maintenance_task_yaml, marker: "sqlite_maintenance") log :skip, "could not schedule (config/recurring.yml missing or already scheduled)" end else log :info, "solid_queue not found — job installed but not scheduled. Add a 'sqlite_maintenance' entry to your scheduler." end rescue => e exception "#{self.class} failed:", e end |