Skip to content

Commit

Permalink
Unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Jan 15, 2025
1 parent 145ad22 commit 6d98540
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/books/populate_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions app/jobs/populate_book_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6d98540

Please sign in to comment.