Class: CDMDEXER::TransformWorker
- Inherits:
-
Object
- Object
- CDMDEXER::TransformWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/cdmdexer/transform_worker.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
readonly
Returns the value of attribute batch_size.
-
#cdm_endpoint ⇒ Object
readonly
Returns the value of attribute cdm_endpoint.
- #cdm_item_klass ⇒ Object
-
#field_mappings ⇒ Object
readonly
Returns the value of attribute field_mappings.
- #load_worker_klass ⇒ Object
-
#oai_endpoint ⇒ Object
readonly
Returns the value of attribute oai_endpoint.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
-
#solr_config ⇒ Object
readonly
Returns the value of attribute solr_config.
- #transformer_klass ⇒ Object
- #transformer_worker_klass ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#batch_size ⇒ Object (readonly)
Returns the value of attribute batch_size.
5 6 7 |
# File 'lib/cdmdexer/transform_worker.rb', line 5 def batch_size @batch_size end |
#cdm_endpoint ⇒ Object (readonly)
Returns the value of attribute cdm_endpoint.
5 6 7 |
# File 'lib/cdmdexer/transform_worker.rb', line 5 def cdm_endpoint @cdm_endpoint end |
#cdm_item_klass ⇒ Object
34 35 36 |
# File 'lib/cdmdexer/transform_worker.rb', line 34 def cdm_item_klass @cdm_item_klass ||= CdmItem end |
#field_mappings ⇒ Object (readonly)
Returns the value of attribute field_mappings.
5 6 7 |
# File 'lib/cdmdexer/transform_worker.rb', line 5 def field_mappings @field_mappings end |
#load_worker_klass ⇒ Object
42 43 44 |
# File 'lib/cdmdexer/transform_worker.rb', line 42 def load_worker_klass @load_worker_klass ||= LoadWorker end |
#oai_endpoint ⇒ Object (readonly)
Returns the value of attribute oai_endpoint.
5 6 7 |
# File 'lib/cdmdexer/transform_worker.rb', line 5 def oai_endpoint @oai_endpoint end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
5 6 7 |
# File 'lib/cdmdexer/transform_worker.rb', line 5 def records @records end |
#solr_config ⇒ Object (readonly)
Returns the value of attribute solr_config.
5 6 7 |
# File 'lib/cdmdexer/transform_worker.rb', line 5 def solr_config @solr_config end |
#transformer_klass ⇒ Object
38 39 40 |
# File 'lib/cdmdexer/transform_worker.rb', line 38 def transformer_klass @transformer_klass ||= Transformer end |
#transformer_worker_klass ⇒ Object
46 47 48 |
# File 'lib/cdmdexer/transform_worker.rb', line 46 def transformer_worker_klass @transformer_worker_klass ||= TransformWorker end |
Instance Method Details
#perform(records, solr_config, cdm_endpoint, oai_endpoint, field_mappings, batch_size) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/cdmdexer/transform_worker.rb', line 17 def perform(records, solr_config, cdm_endpoint, oai_endpoint, field_mappings, batch_size) @records = records @solr_config = solr_config @cdm_endpoint = cdm_endpoint @oai_endpoint = oai_endpoint @field_mappings = field_mappings @batch_size = batch_size transform_and_load! transform_and_load_compounds! end |