Class: CDMBL::BatchDeleterWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/cdmbl/batch_deleter_worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#batch_deleter_klass=(value) ⇒ Object

Sets the attribute batch_deleter_klass

Parameters:

  • value

    the value to set the attribute batch_deleter_klass to.



6
7
8
# File 'lib/cdmbl/batch_deleter_worker.rb', line 6

def batch_deleter_klass=(value)
  @batch_deleter_klass = value
end

#oai_client=(value) ⇒ Object

Sets the attribute oai_client

Parameters:

  • value

    the value to set the attribute oai_client to.



6
7
8
# File 'lib/cdmbl/batch_deleter_worker.rb', line 6

def oai_client=(value)
  @oai_client = value
end

#oai_urlObject (readonly)

Returns the value of attribute oai_url.



5
6
7
# File 'lib/cdmbl/batch_deleter_worker.rb', line 5

def oai_url
  @oai_url
end

#prefixObject (readonly)

Returns the value of attribute prefix.



5
6
7
# File 'lib/cdmbl/batch_deleter_worker.rb', line 5

def prefix
  @prefix
end

#solr_client=(value) ⇒ Object

Sets the attribute solr_client

Parameters:

  • value

    the value to set the attribute solr_client to.



6
7
8
# File 'lib/cdmbl/batch_deleter_worker.rb', line 6

def solr_client=(value)
  @solr_client = value
end

#solr_urlObject (readonly)

Returns the value of attribute solr_url.



5
6
7
# File 'lib/cdmbl/batch_deleter_worker.rb', line 5

def solr_url
  @solr_url
end

#startObject (readonly)

Returns the value of attribute start.



5
6
7
# File 'lib/cdmbl/batch_deleter_worker.rb', line 5

def start
  @start
end

Instance Method Details

#perform(start = 0, prefix = '', oai_url = '', solr_url = '') ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/cdmbl/batch_deleter_worker.rb', line 7

def perform(start = 0, prefix = '', oai_url = '', solr_url = '')
  @start    = start
  @prefix   = prefix
  @oai_url  = oai_url
  @solr_url = solr_url
  delete!
  batch_deleter
end