fix que integration in Active Job tests part 2

Fixing the synchronous setting uncovered some more errors with Que 1.0:
exception tests with retry_on started failing due to an assertion in
Que's Active Job integration that running jobs won't nest. However, this
is not the case when running retriable jobs synchronously.

This change overrides Que's Active Job wrapper to not make this
assertion.

I also opened an issue in the que repo: https://github.com/que-rb/que/issues/329
This commit is contained in:
Hartley McGuire 2022-01-24 21:56:38 -05:00
parent 23ce9a7f10
commit 4eefa1feb0
1 changed files with 6 additions and 0 deletions

View File

@ -15,3 +15,9 @@ Que::Job.class_eval do
run(*args)
end
end
Que::ActiveJob::WrapperExtensions.class_eval do
def run(args)
super(args.deep_stringify_keys)
end
end