Replies: 1 comment
-
This. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Until Sidekiq 7, we could set client middleware like so:
This piece of code would run and be applied for both sidekiq and client processes
With Sidekiq 7 changes, since we don't seem to have a direct access to the middleware chains, it looks like in order to add the same client middleware to both client (e.g. puma) and server sidekiq processes, we would now need to duplicate this code:
we could, of course, use something like this:
but that looks hacky.
Is the second piece of code the way to go? Is the new, "idiomatically correct" way to go is to duplicate the code or am I missing something? Feels a bit redundant, since unless you're not enqueueing any jobs from Sidekiq process, you would probably need to add every client middleware to the chain twice.
Beta Was this translation helpful? Give feedback.
All reactions