Sidekiq and Request-Specific Context

1 · Mike Perham · July 30, 2022, 3:28 p.m.
At some point in growing a large-scale software system, you’ll require “out of band” context: data which is not explicitly passed as an argument to a function but rather implicitly attached to the request, job or event being processed. Usually context is implemented as thread-local variables; your code first sets up the necessary context and then processes the request. A common example is multi-tenancy: you might want to limit any data queried by a given request to a database schema specific to ...