Switch to Object.const_get
As we get error with Kernel.const_get(..., false) ``` uninitialized constant Kernel::Gitlab ``` Kernel is included into Object. I guess top level constants are loaded into Object and not the Kernel module.
This commit is contained in:
parent
480d57d2f7
commit
85c94725e5
|
@ -36,7 +36,7 @@ module PrometheusAdapter
|
|||
def calculate_reactive_cache(query_class_name, *args)
|
||||
return unless prometheus_client
|
||||
|
||||
data = Kernel.const_get(query_class_name, false).new(prometheus_client_wrapper).query(*args)
|
||||
data = Object.const_get(query_class_name, false).new(prometheus_client_wrapper).query(*args)
|
||||
{
|
||||
success: true,
|
||||
data: data,
|
||||
|
|
Loading…
Reference in New Issue