Skip to content

Commit

Permalink
Do 8 concurrent tasks instead of 10
Browse files Browse the repository at this point in the history
This splits the 22 sets of images up more evenly, and uses a bit fewer
concurrent resources. Previous iteration overwhelmed the staging machine
into a memory allocation crash. Resources have also been increased.
  • Loading branch information
hackartisan committed Oct 11, 2023
1 parent 27223df commit d8a7dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/card_image_loading_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(logger: nil, suppress_progress: false)
def import
barrier = Async::Barrier.new
Sync do
semaphore = Async::Semaphore.new(10, parent: barrier)
semaphore = Async::Semaphore.new(8, parent: barrier)

(1..22).map do |disk|
semaphore.async do
Expand Down

0 comments on commit d8a7dbb

Please sign in to comment.