Skip to content

Middleware order #194

@Vagab

Description

@Vagab

Not sure if this is expected or not, but while trying to work with this gem I found myself needing to customize the order in which middlewares are run. And I need throttled middleware to run after a particular middleware. Now the problem is that the throttled middleware still runs before every other middleware. I did a little bit of investigation and what I found is this, let me know if it makes sense:
In sidekiq when you perform_async the job will later be processed by processor.rb, but that will actually run the middleware after fetching the job, but before processing. And ThrottledFetcher overrides the fetch so that it checks whether the job has to be processed before it is actually processed(which makes sense) but it makes the middleware order useless

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions