Class: DbBlaster::PublishAllJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- DbBlaster::PublishAllJob
- Defined in:
- app/jobs/db_blaster/publish_all_job.rb
Overview
Enqueues PublishSourceTableJob for every source-table
Instance Method Summary collapse
Instance Method Details
#batch_start_time ⇒ Object
19 20 21 |
# File 'app/jobs/db_blaster/publish_all_job.rb', line 19 def batch_start_time @batch_start_time ||= DateTime.now.utc.strftime(DbBlaster::Configuration::DEFAULT_DATETIME_FORMAT) end |
#perform ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/jobs/db_blaster/publish_all_job.rb', line 11 def perform SyncSourceTablesWithConfiguration.sync DbBlaster::SourceTable.pluck(:id).each do |source_table_id| PublishSourceTableJob.perform_later(source_table_id, batch_start_time) end end |