Skip to content

Commit

Permalink
Consolidate queue_as targets
Browse files Browse the repository at this point in the history
The ingest-related events go to :ingest queue.
The :default queue gets the rest.
Note: the :resolrize queue remains separate.
  • Loading branch information
atz committed May 12, 2016
1 parent 6ba8c11 commit b525f1e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions app/jobs/audit_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class AuditJob < ActiveJob::Base
queue_as :audit

# URI of the resource to audit.
# This URI could include the actual resource (e.g. content) and the version to audit:
# http://localhost:8983/fedora/rest/test/a/b/c/abcxyz/content/fcr:versions/version1
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/characterize_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CharacterizeJob < ActiveJob::Base
queue_as :characterize
queue_as :ingest

# @param [FileSet] file_set
# @param [String] filename a local path for the file to characterize. By using this, we don't have to pull a copy out of fedora.
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/create_derivatives_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CreateDerivativesJob < ActiveJob::Base
queue_as :derivatives
queue_as :ingest

# @param [FileSet] file_set
# @param [String] file_name
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/import_url_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'tempfile'

class ImportUrlJob < ActiveJob::Base
queue_as :import_url
queue_as :ingest

before_enqueue do |job|
log = job.arguments.last
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/ingest_local_file_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class IngestLocalFileJob < ActiveJob::Base
queue_as :ingest_local
queue_as :ingest

# @param [FileSet] file_set
# @param [String] path
Expand Down
2 changes: 0 additions & 2 deletions app/jobs/visibility_copy_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class VisibilityCopyJob < ActiveJob::Base
queue_as :permissions

def perform(work)
work.file_sets.each do |file|
file.visibility = work.visibility # visibility must come first, because it can clear an embargo/lease
Expand Down

0 comments on commit b525f1e

Please sign in to comment.