Skip to content

Commit

Permalink
increase concurrency for brackground jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 4, 2020
1 parent 449e61e commit 42b3c55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/jobs/doi_import_by_id_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class DoiImportByIdJob < ActiveJob::Base
queue_as :lupo_background
queue_as :lupo_import

rescue_from ActiveJob::DeserializationError, Elasticsearch::Transport::Transport::Errors::BadRequest do |error|
Rails.logger.error error.message
Expand Down
1 change: 0 additions & 1 deletion app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module Indexable
# use index_document instead of update_document to also update virtual attributes
IndexJob.perform_later(self)
if self.class.name == "Doi"
update_column(:indexed, Time.zone.now)
send_import_message(self.to_jsonapi) if aasm_state == "findable" && !Rails.env.test? && !%w(crossref.citations medra.citations jalc.citations kisti.citations op.citations).include?(client.symbol.downcase)
# reindex prefix, not triggered by standard callbacks
elsif ["ProviderPrefix", "ClientPrefix"].include?(self.class.name)
Expand Down
8 changes: 6 additions & 2 deletions config/shoryuken.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
concurrency: 12
concurrency: 15
delay: 0
pidfile: tmp/pids/shoryuken.pid
queues:
- lupo

groups:
import:
concurrency: 10
queues:
- lupo_import
transfer:
concurrency: 3
concurrency: 10
queues:
- lupo_transfer
background:
Expand Down

0 comments on commit 42b3c55

Please sign in to comment.