You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We think that the return value of ready_scope.limit(1) is ActiveRecord::Relation and ActiveRecord::Relation has update method in addition to update_all method in Rails 3 and later.
In addition, the target record of ready_scope.limit(1) to be updated is only one record.
Therefore, we think you can use update instead of update_all.
Could you please tell me why you are using the update_all method?
Thank you.
The text was updated successfully, but these errors were encountered:
Hello, I read the code in the
reserve_with_scope_using_optimized_mysql
method and found the following code.delayed_job_active_record/lib/delayed/backend/active_record.rb
Line 148 in d65b0f9
We think that the return value of
ready_scope.limit(1)
isActiveRecord::Relation
andActiveRecord::Relation
hasupdate
method in addition toupdate_all
method in Rails 3 and later.In addition, the target record of
ready_scope.limit(1)
to be updated is only one record.Therefore, we think you can use
update
instead ofupdate_all
.Could you please tell me why you are using the
update_all method
?Thank you.
The text was updated successfully, but these errors were encountered: