BigW Consortium Gitlab

Skip to content
  • Nick Thomas's avatar
    6647542c
    Fix Gitlab::Metrics metaprogramming magic · 6647542c
    Nick Thomas authored
    On initial startup with no rows in the application_settings table, the
    metaprogramming call to `if enabled?` attempts to create a row. This triggers
    the HTML caching path, which attempts to store metrics.
    
    At this point, not all the methods in `Gitlab::Metrics` have been defined! Move
    `current_transaction` to be defined before running the metaprogramming, to
    avoid a confusing NoMethodError
    6647542c
    Fix Gitlab::Metrics metaprogramming magic
    Nick Thomas authored
    On initial startup with no rows in the application_settings table, the
    metaprogramming call to `if enabled?` attempts to create a row. This triggers
    the HTML caching path, which attempts to store metrics.
    
    At this point, not all the methods in `Gitlab::Metrics` have been defined! Move
    `current_transaction` to be defined before running the metaprogramming, to
    avoid a confusing NoMethodError
Loading