Skip to content

Commit

Permalink
Invoke prepare after Provider is defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 5, 2024
1 parent a660440 commit 74bfb4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/metrics/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def require_backend(env = ENV)
if require(backend)
Metrics.extend(Backend::Interface)

self.prepare

return true
end
rescue LoadError => error
Expand Down
2 changes: 2 additions & 0 deletions lib/metrics/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def self.Provider(klass, &block)

return provider
end

Config::DEFAULT.prepare
else
def self.Provider(klass, &block)
# Metrics disabled.
Expand Down

0 comments on commit 74bfb4c

Please sign in to comment.