Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Nov 1, 2024
1 parent 10f197e commit 7e451c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/v1/books/populate_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def update
track_book_populate_queued do
PopulateBookJob.perform_later current_user, @book, @case
end

head :no_content
end

Expand All @@ -45,7 +45,7 @@ def track_book_populate_queued

# Yield to the block to perform the job
yield if block_given?
end
end
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/books/import_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create
@book.import_file.attach(io: StringIO.new(compressed_data), filename: "book_import_#{@book.id}.bin.zip",
content_type: 'application/zip')
@book.save

track_book_import_queued do
ImportBookJob.perform_later current_user, @book
end
Expand All @@ -77,12 +77,12 @@ def create
def read_json file
JSON.parse(file.read)
end

def track_book_import_queued
@book.update(import_job: "queued at #{Time.zone.now}")

# Yield to the block to perform the job
yield if block_given?
end
end
end
end
2 changes: 1 addition & 1 deletion app/jobs/populate_snapshot_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class PopulateSnapshotJob < ApplicationJob
queue_as :default

# rubocop:disable Security/MarshalLoad
def perform snapshot
# down the road we should be using ActiveRecord-import and first_or_initialize instead.
Expand Down

0 comments on commit 7e451c1

Please sign in to comment.