forked from collectiveidea/delayed_job_active_record
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
Draft
gz2ca
wants to merge
72
commits into
master
Choose a base branch
from
v4.1.7_skip-locked-patched
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
stellaconyer
approved these changes
Oct 14, 2022
This is perhaps outside the scope of what we're trying to do here, but is there a reason not to upstream this optimization? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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