Skip to content
  • Dylan Griffith's avatar
    Attempt to clarify docs how to use LimitedCapacity::Worker · b5bee074
    Dylan Griffith authored and Marius Bobin's avatar Marius Bobin committed
    The previous documentation said "a cron worker must be defined as well"
    which did not seem to be correct as some of these workers aren't queued
    this way. Additionally the previous example didn't make sense because
    cron workers don't get passed arguments.
    
    I've also opted to remove the duplicated docs example from the class for
    a single source of truth. I also like the docs in the Ruby code to make
    it clearer to the reader but the risk of getting out of sync with the
    primary documentation (and the fact that it was currently confusing)
    seemed like it wasn't worth keeping.
    
    After some discussion in
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131856#note_1560807567
    I also clarified that this worker doesn't really keep the arguments sent
    to it in a queue like a normal worker so I wanted to make that more
    explicit that it can't just be used to throttle a normal worker.
    b5bee074