mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Introduce deprecation warning for non-json Job arguments (#15842)
This commit introduces our own handling and warning for Sidekiq's new 'non-json-serializable' warning. This decouples us from Sidekiq's own deprecation cycle, and allows us to use our own deprecation system. It also means that the dump/parse happens in test mode, which will help us to catch occurrences before they reach production.
This commit is contained in:
@@ -108,7 +108,7 @@ describe Jobs do
|
||||
end
|
||||
|
||||
it "executes the job right away" do
|
||||
Jobs::ProcessPost.any_instance.expects(:perform).with(post_id: 1, sync_exec: true, current_site_id: "default")
|
||||
Jobs::ProcessPost.any_instance.expects(:perform).with("post_id" => 1, "sync_exec" => true, "current_site_id" => "default")
|
||||
Jobs.enqueue(:process_post, post_id: 1)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user