From 10b59f461c46804d2e6ea3d1723090cc9089a937 Mon Sep 17 00:00:00 2001 From: Jeremiah Rose Date: Wed, 3 Aug 2022 10:02:34 +1000 Subject: [PATCH] Remove assertion that jobs are never nested in the ActiveJob extension This assertion is untrue in the Rails ActiveJob tests, and has been overridden in the Rails repo, so it never runs anyway. --- lib/que/active_job/extensions.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/que/active_job/extensions.rb b/lib/que/active_job/extensions.rb index 448e3852..45037d9a 100644 --- a/lib/que/active_job/extensions.rb +++ b/lib/que/active_job/extensions.rb @@ -82,11 +82,6 @@ def run(args) # option under the circumstances (doesn't require hacking ActiveJob in # any more extensive way). - # There's no reason this logic should ever nest, because it wouldn't - # make sense to run a worker inside of a job, but even so, assert that - # nothing absurd is going on. - Que.assert NilClass, Thread.current[:que_current_job] - begin Thread.current[:que_current_job] = self