mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-09 22:28:04 -05:00
22 lines
585 B
Ruby
22 lines
585 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Entry point job for parallel track generation
|
|
# Coordinates the entire parallel processing workflow
|
|
class Tracks::ParallelGeneratorJob < ApplicationJob
|
|
queue_as :tracks
|
|
|
|
def perform(user_id, start_at: nil, end_at: nil, mode: :bulk, chunk_size: 1.day)
|
|
user = User.find(user_id)
|
|
|
|
Tracks::ParallelGenerator.new(
|
|
user,
|
|
start_at: start_at,
|
|
end_at: end_at,
|
|
mode: mode,
|
|
chunk_size: chunk_size
|
|
).call
|
|
rescue StandardError => e
|
|
ExceptionReporter.call(e, 'Failed to start parallel track generation')
|
|
end
|
|
end
|