• Kamil Trzciński's avatar
    Make QueryAnalyzers to hold a state and hook to middleware · 99cc0e40
    Kamil Trzciński authored
    One of the problems of QueryAnalyzers is that their state
    is evaluated each time. This is problematic for various reasons
    as we need to re-evaluate feature flags, or other dynamic conditions.
    
    This makes QueryAnalyzers behavior sticky. The enabled flag is checked
    exactly once for each request/worker/spec. If it resolves to true,
    the query analyzer will be enabled for the whole execution of a job.
    
    This makes also QueryAnalyzer to hold a context that is set/reset
    on boundaries of job execution.
    99cc0e40
base.rb 537 Bytes