Commit 85c94725 authored by Thong Kuah's avatar Thong Kuah

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.
parent 480d57d2
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment