nori
nori copied to clipboard
Nori::StringWithAttributes should implement `#as_json`
Sidekiq 7 now requires that arguments serialize "safely" to JSON. This means they need to become basic types such as String.
Right now, trying to send an object with a Nori::StringWithAttributes to a Sidekiq worker queue raises an ArgumentError with something like
Job arguments to SomeWorker must be native JSON types, but "OK" is a Nori::StringWithAttributes. See https://github.com/sidekiq/sidekiq/wiki/Best-Practices To disable this error, add
Sidekiq.strict_args!(false)to your initializer.