Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sidekiq-serialized_current_attributes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sidekiq-serialized_current_attributes

  • 0.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Sidekiq::SerializedCurrentAttributes

Extends Sidekiq::CurrentAttributes to serialize values (such as activerecord objects).

Installation

Install the gem and add to the application's Gemfile by executing:

bundle add sidekiq-serialized_current_attributes

Usage

Automatically save and load any current attributes in the execution context so context attributes "flow" from Rails actions into any associated jobs. This can be useful for multi-tenancy, i18n locale, timezone, any implicit per-request attribute. See ActiveSupport::CurrentAttributes.

For multiple current attributes, pass an array of current attributes.

# in your initializer
require "sidekiq/serialized_current_attributes"
Sidekiq::SerializedCurrentAttributes.persist("Myapp::Current")
# or multiple current attributes
Sidekiq::SerializedCurrentAttributes.persist(["Myapp::Current", "Myapp::OtherCurrent"])

# Discard destroyed records when serializing Current
Sidekiq::SerializedCurrentAttributes.discard_destroyed = true

Changelog

0.1.3 (2024-10-28)

  • Reference global ::ActiveJob
  • Prepend Load to server middleware

0.1.2 (2024-01-08)

  • Change license to LGPL

0.1.1 (2023-10-16)

  • Add option to discard destroyed records

0.1.0

  • Initial release

FAQs

Package last updated on 28 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc