-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply SKIP LOCKED optimization v4.1.7 #3
base: master
Are you sure you want to change the base?
Conversation
This prevents potential destruction of already existent data.
Instead of reading the entire job record for our detect loop, just pluck the ID, and only read the job record after we've successfully locked the job.
Fixing travis builds
ActiveRecord <= 4.0 are not compatible with mysql 5.7. Choosing to drop these out of our test runs.
Fix up travis config for platform updates
MySQL 5.7 no longer supports null default values for the primary key. Override the Native default for primary keys in MySql. https://stackoverflow.com/a/34555109
For most versions the constant actually lives under `AbstractMysqlAdapter`
…patibility [WIP] Rails 6 compatibility
Explicitly requiring ActiveRecord models in `lib/delayed_job_active_record.rb` may result in losing custom configurations that are set in config/initializers on Rails. Let' use Railtie and ActiveSupport.on_load to set it up so that Delayed::Backend::ActiveRecord::Job model will respect arbitrary configs.
Delay initializing of backend until all initializers have run.
Removing calls to `find_by` and `pluck` for Rails 3.0 compatibility.
…ce-true-from-migration Remove force flag from migration
…-strategy Optimize default sql performance
…github-actions Attempt to use GitHub actions
Allow rails 6.1
…fix/autoload Revert "Fix Rails autoloading"
Since psych4.0, the load method has been safe_load, which causes the following error. So I use YAML#load_dj to avoid them. ref: ref: collectiveidea/delayed_job@b4ddd3d ``` 1) ActiveRecord loads classes with non-default primary key Failure/Error: expect do YAML.load(Story.create.to_yaml) end.not_to raise_error expected no Exception, got #<Psych::DisallowedClass: Tried to load unspecified class: Story> with backtrace: # ./spec/delayed/serialization/active_record_spec.rb:8:in `block (3 levels) in <top (required)>' # ./spec/delayed/serialization/active_record_spec.rb:7:in `block (2 levels) in <top (required)>' # ./spec/delayed/serialization/active_record_spec.rb:7:in `block (2 levels) in <top (required)>' ```
If we use Ruby 3.0 without quotations in YAML, It is interpreted as "3". If you specify 3 on GitHub Actions, it means the latest stable version of the 3 series, so 3.1 will be used.
Rails 7.0.0 doesn't work with Ruby 3.1. ref: rails/rails#43951
Active Record shouldn't introduce any breaking changes until version 8
…ils-7-0 Finish rails 7 support
This is perhaps outside the scope of what we're trying to do here, but is there a reason not to upstream this optimization? |
I got pinged for this old PR, is it still applicable? |
As far as I can tell, we're still pinned to this branch for our production deploys. That said, I've also got a PR open to up-stream this, and so it might make more sense to pin to that since it will (hopefully) be merged, or at least track the upstream directly. |
Need to upgrade to v4.1.7 for Rails 6.1 upgrade https://github.com/docsend/elaine/pull/9657
Only change on top of v4.1.7 is the skip lock optimization collectiveidea:delayed_job_active_record:v4.1.7...v4.1.7_skip-locked-patched