• Sean McGivern's avatar
    Do not log explicit Gitlab::SidekiqStatus.set calls · 0ee1bc8a
    Sean McGivern authored
    We have a feature flag - log_implicit_sidekiq_status_calls - that will
    log any calls to check the Sidekiq status of a job that had its status
    set in Redis implicitly. By implicitly, we mean that the job class
    itself did not opt-in to this with `sidekiq_options`, and that the
    caller didn't use `with_status`. In the case where the status check was
    requested up-front, we set a different value in Redis (2, rather than
    the default of 1) in our Sidekiq client middleware.
    
    There was a case I missed, however: not all job status values are
    written by the client middleware! There are two cases where we call
    `Gitlab::SidekiqStatus.set` explicitly, and those should also be treated
    as having opted in for the purposes of logging. So here we set their
    values to 2 as well.
    0ee1bc8a
set_async_jid_spec.rb 769 Bytes