mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
* Breaks up Zipfulldata worker into service classes * Fixes N+1 queries for phenotype and picture phenotype CSVs * moving phenotype CSV generation into database for performance * Fixes unintentional deletion of unrelated files * Reduces the time it takes to assemble the zip file from about 10 to about 5 hours, with the bottle-neck being zipping the genotype files
14 lines
443 B
Ruby
14 lines
443 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DataZipperWorker
|
|
include Sidekiq::Worker
|
|
sidekiq_options queue: :zipfulldata, retry: 0, unique: true, dead: false
|
|
# can't do retry => false.
|
|
# Note with retry disabled, Sidekiq will not track or save any error data for the worker's jobs.
|
|
# dead => false means don't send dead job to the dead queue, we don't care about that
|
|
|
|
def perform
|
|
DataZipperService.new(logger: logger).call
|
|
end
|
|
end
|