Sha256: ec26d9f1f18f55bc5de2cca2bb56b8bb1410c16af560dd9506c8565547341d58
Contents?: true
Size: 544 Bytes
Versions: 24
Compression:
Stored size: 544 Bytes
Contents
module Ddr::Batch class BatchProcessorJob @queue = :batch def self.perform(batch_id, operator_id) ts = Time.now.strftime("%Y%m%d%H%M%S%L") logfile = "batch_processor_#{ts}_log.txt" batch = Batch.find(batch_id) operator = User.find(operator_id) bp = BatchProcessor.new(batch, operator, log_file: logfile) bp.execute end def self.after_enqueue_set_status(batch_id, operator_id) batch = Batch.find(batch_id) batch.status = Batch::STATUS_QUEUED batch.save end end end
Version data entries
24 entries across 24 versions & 1 rubygems