From 6d98540d5a6e1ef40df0963bd6e127e0355ba9b6 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Wed, 15 Jan 2025 09:26:17 -0500 Subject: [PATCH] Unused variable --- app/controllers/api/v1/books/populate_controller.rb | 2 +- app/jobs/populate_book_job.rb | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/v1/books/populate_controller.rb b/app/controllers/api/v1/books/populate_controller.rb index 6b0ba57f0..b41242ed9 100644 --- a/app/controllers/api/v1/books/populate_controller.rb +++ b/app/controllers/api/v1/books/populate_controller.rb @@ -25,7 +25,7 @@ def update @book.populate_file.attach(io: StringIO.new(compressed_data), filename: "book_populate_#{@book.id}.bin.zip", content_type: 'application/zip') track_book_populate_queued do - PopulateBookJob.perform_later @book, @case, @current_user + PopulateBookJob.perform_later @book, @case end head :no_content diff --git a/app/jobs/populate_book_job.rb b/app/jobs/populate_book_job.rb index 9de3b4569..08e952f19 100644 --- a/app/jobs/populate_book_job.rb +++ b/app/jobs/populate_book_job.rb @@ -6,10 +6,9 @@ class PopulateBookJob < ApplicationJob # rubocop:disable Security/MarshalLoad # rubocop:disable Metrics/MethodLength # rubocop:disable Metrics/AbcSize - def perform book, kase, _user + def perform book, kase # down the road we should be using ActiveRecord-import and first_or_initialize instead. # See how snapshots are managed. - book.query_doc_pairs.empty? book.update(populate_job: "populate started at #{Time.zone.now}") compressed_data = book.populate_file.download @@ -52,9 +51,6 @@ def perform book, kase, _user book.populate_file.purge book.populate_job = nil book.save - - # throwing an exception in tests.. - # Analytics::Tracker.track_query_doc_pairs_bulk_updated_event user, book, is_book_empty end # rubocop:enable Security/MarshalLoad # rubocop:enable Metrics/MethodLength