lib/bulkrax.rb in bulkrax-5.2.1 vs lib/bulkrax.rb in bulkrax-5.3.0

- old
+ new

@@ -32,10 +32,19 @@ :relationship_job_class, :removed_image_path, :required_elements, :reserved_properties, :server_name + + attr_writer :use_locking + + def use_locking + return @use_locking if defined?(@use_locking) + + ENV.key?("REDIS_HOST") + end + alias use_locking? use_locking end def config @config ||= Configuration.new yield @config if block_given? @@ -85,10 +94,13 @@ :required_elements, :required_elements=, :reserved_properties, :reserved_properties=, :server_name, - :server_name= + :server_name=, + :use_locking, + :use_locking=, + :use_locking? config do |conf| conf.parsers = [ { name: "OAI - Dublin Core", class_name: "Bulkrax::OaiDcParser", partial: "oai_fields" }, { name: "OAI - Qualified Dublin Core", class_name: "Bulkrax::OaiQualifiedDcParser", partial: "oai_fields" },