• Sean McGivern's avatar
    Declare loggable non-numeric arguments in worker classes · b8fbd34d
    Sean McGivern authored
    Having these in a hash in the SidekiqProcessor has a few problems:
    
    1. It's very far away from the definition of `perform`, so it's hard to
       verify.
    2. That also makes it harder to notice.
    3. The big hash is more prone to conflicts or ordering issues.
    
    This adds a `loggable_arguments` method to `ApplicationWorker`. When
    called with any arguments, it acts as a getter. When called with no
    arguments, it acts as a getter.
    
    The arguments have to be declared by position, because we don't know
    what they're called in Sidekiq. There is also no need to mark numeric
    arguments as loggable as they are loggable anyway.
    b8fbd34d
export_csv_worker.rb 593 Bytes