Skip to content

Commit

Permalink
Unreduce a little
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Nov 6, 2023
1 parent b70bdb2 commit 56888c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/jobs/create_submission_file_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class CreateSubmissionFileJob < ApplicationJob
queue_as :submission_download
good_job_control_concurrency_with(total_limit: 1, key: -> { "#{arguments.first.id}-#{arguments.second[:identifier]}" })

def perform(artist_submission, file)
submission_file = SubmissionFile.find_by(artist_submission: artist_submission, file_identifier: file[:identifier])
Expand Down
1 change: 1 addition & 0 deletions app/jobs/e6_iqdb_query_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class E6IqdbQueryJob < ApplicationJob
queue_as :e6_iqdb
good_job_control_concurrency_with(total_limit: 1, key: -> { arguments.first.id })

PRIORITIES = {
immediate: 100,
Expand Down
1 change: 1 addition & 0 deletions app/jobs/scrape_artist_url_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class ScrapeArtistUrlJob < ApplicationJob
queue_as :scraping
good_job_control_concurrency_with(total_limit: 1, key: -> { arguments.first.id })

def perform(artist_url) # rubocop:disable Metrics/CyclomaticComplexity
return unless artist_url.scraper_enabled?
Expand Down

0 comments on commit 56888c8

Please sign in to comment.