1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-16 04:56:58 +00:00
Files
wrestlingdev.com/app/jobs/wrestlingdev_import_job.rb

21 lines
709 B
Ruby

class WrestlingdevImportJob < ApplicationJob
queue_as :default
# Class method for direct execution in test environment
def self.perform_sync(tournament, import_data = nil)
# Execute directly on provided objects
importer = WrestlingdevImporter.new(tournament)
importer.import_data = import_data if import_data
importer.import_raw
end
def perform(tournament, import_data = nil)
# Log information about the job
Rails.logger.info("Starting import for tournament ##{tournament.id} (#{tournament.name})")
# Execute the import
importer = WrestlingdevImporter.new(tournament)
importer.import_data = import_data if import_data
importer.import_raw
end
end