Skip to content

Commit

Permalink
Merge pull request #1487 from mlibrary/DEEPBLUE-307-update-aptrust-mo…
Browse files Browse the repository at this point in the history
…dule-2

DEEPBLUE-307 - Update APTrust module - 2
  • Loading branch information
fritzfreiheit authored Jan 18, 2024
2 parents 2443388 + bb278bb commit 9f408b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ GEM
multipart-post (2.2.3)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
mysql2 (0.5.4)
mysql2 (0.5.5)
namae (1.1.1)
nest (3.2.0)
redic
Expand Down
24 changes: 12 additions & 12 deletions app/services/aptrust/aptrust_filter_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ def include?( work: )

class Aptrust::FilterStatus

SKIP_STATUSES = [ EVENT_DEPOSITED,
EVENT_DEPOSIT_SKIPPED,
EVENT_UPLOAD_SKIPPED,
EVENT_EXPORT_FAILED,
EVENT_VERIFIED,
EVENT_VERIFY_FAILED,
EVENT_VERIFYING ] unless const_defined? :SKIP_STATUSES
SKIP_STATUSES = [ Aptrust::EVENT_DEPOSITED,
Aptrust::EVENT_DEPOSIT_SKIPPED,
Aptrust::EVENT_UPLOAD_SKIPPED,
Aptrust::EVENT_EXPORT_FAILED,
Aptrust::EVENT_VERIFIED,
Aptrust::EVENT_VERIFY_FAILED,
Aptrust::EVENT_VERIFYING ] unless const_defined? :SKIP_STATUSES

attr_accessor :debug_verbose
attr_accessor :skip_statuses
Expand Down Expand Up @@ -99,9 +99,9 @@ def include?( work: )

class Aptrust::AptrustFilterWork

FILTER_IN = FilterIn.new
DEFAULT_FILTER_SIZE = FilterSize.new( min_size: 1, max_size: 100_000_000_000 )
DEFAULT_FILTER_STATUS = FilterStatus.new
FILTER_IN = Aptrust::FilterIn.new
DEFAULT_FILTER_SIZE = Aptrust::FilterSize.new( min_size: 1, max_size: 100_000_000_000 )
DEFAULT_FILTER_STATUS = Aptrust::FilterStatus.new

attr_accessor :debug_verbose
attr_accessor :filter_by_date
Expand Down Expand Up @@ -134,15 +134,15 @@ def set_filter_by_date( begin_date:, end_date: )
end

def set_filter_by_size( min_size: 1, max_size: )
@filter_by_size = FilterSize.new( min_size: min_size, max_size: max_size )
@filter_by_size = Aptrust::FilterSize.new( min_size: min_size, max_size: max_size )
@filter_by_size.debug_verbose = debug_verbose if @filter_by_size.respond_to? :debug_verbose=
end

def set_filter_by_status( skip_statuses: nil )
if skip_statuses.blank?
@filter_by_status = FILTER_IN
else
@filter_by_status = FilterStatus.new( skip_statuses: skip_statuses )
@filter_by_status = Aptrust::FilterStatus.new( skip_statuses: skip_statuses )
@filter_by_status.debug_verbose = debug_verbose if @filter_by_status.respond_to? :debug_verbose=
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/aptrust/aptrust_find_and_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Aptrust::AptrustFindAndUpload

mattr_accessor :test_mode, default: true

FILTER_DEFAULT = AptrustFilterWork.new unless const_defined? :FILTER_DEFAULT
FILTER_DEFAULT = Aptrust::AptrustFilterWork.new unless const_defined? :FILTER_DEFAULT

attr_accessor :clean_up_after_deposit
attr_accessor :clear_status
Expand Down

0 comments on commit 9f408b5

Please sign in to comment.