Skip to content

Commit 266c3f0

Browse files
author
Kirk Wang
committed
🐛 Hardcode Blacklight.repository_class
We're seeing this error sometimes in the worker: ``` RuntimeError (The value for :adapter was not found in the blacklight.yml config) ``` This patch will make the `Blacklight.repository_class` to be hardcoded to `Blacklight::Solr::Repository` to see if it fixes the issue.
1 parent 9aec142 commit 266c3f0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/blacklight_decorator.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
# OVERRIDE Blacklight v7.35.0 to hardcode the repository_class to `Blacklight::Solr::Repository`
4+
# sometimes in the worker, we're seeing it lose the information from the blacklight.yml
5+
module BlacklightDecorator
6+
extend ActiveSupport::Concern
7+
8+
class_methods do
9+
def repository_class
10+
Blacklight::Solr::Repository
11+
end
12+
end
13+
end
14+
15+
Blacklight.prepend(BlacklightDecorator)

0 commit comments

Comments
 (0)