solid_queue icon indicating copy to clipboard operation
solid_queue copied to clipboard

Not compatible with strict loading by default

Open joeldrapper opened this issue 2 years ago • 3 comments

It looks like some of the queries aren't compatible with a strict_loading_by_default configuration.

With this configuration in application.rb, solid_queue doesn't work.

config.active_record.strict_loading_by_default = true

I will try to find some time to dig into his and open a fix.

joeldrapper avatar Jan 12 '24 00:01 joeldrapper

Ooh, totally @joeldrapper! Thanks for pointing this out. I didn't think of strict_loading_by_default when I was working on this because we've never used that in our apps, so it didn't even cross my mind 😓 🤦‍♀️

If you have time to contribute a fix, that'd be incredible, but if not, we'll definitely tackle this down the road.

Thank you 🙏

rosa avatar Jan 17 '24 09:01 rosa

I spent an absurd amount of time trying to strict load the gem's models. :facepalm: I don't think it's worth it. I opened a PR (#375) to turn strict loading off explicitly on the models. This will allow apps with strict_loading_by_default enabled to use the gem without crashing.

Here's the (WIP) patch to enable strict loading inside of the gem just to give an idea: https://github.com/JoeDupuis/solid_queue/pull/1

JoeDupuis avatar Oct 07 '24 08:10 JoeDupuis