1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activejob/lib/active_job
George Claghorn 4cf7559280 Destroy associations in a background job.
Sometimes cascading association deletions can cause timeouts due to
an IO issue. Perhaps a model has associations that are destroyed on
deletion which in turn trigger other deletions and this can continue
down a complex tree. Along this tree you may also hit other IO
operations. Such deep deletions can lead to server timeouts while
awaiting completion and really the user may not notice all the
changes on their side immediately making them wait unnecesarially or
worse causing a timeout during the operation.

We now allow associations supporting the `dependent:` key to take `:destroy_async`,
which schedules a background job to destroy associations.

Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
Co-authored-by: Cory Gwin @gwincr11 <gwincr11@github.com>
2020-09-24 14:24:15 -04:00
..
queue_adapters Merge pull request #38605 from dmitry/issue-38584 2020-04-08 17:21:57 -04:00
serializers Correct the parameter name for deserialize 2020-03-07 11:48:48 -08:00
arguments.rb Fix keyword arguments warnings in Active Job 2020-01-21 05:53:23 +09:00
base.rb Extract ActiveJob::Instrumentation 2019-09-23 12:29:52 -04:00
callbacks.rb Fix AJ wrong deprecation message on after_callbacks_if_terminated: 2020-03-03 16:17:55 -04:00
configured_job.rb Fix keyword arguments warnings in Action Mailer 2020-01-21 09:23:15 +09:00
core.rb Fix keyword arguments warnings in Active Job 2020-01-21 05:53:23 +09:00
enqueuing.rb Fix AJ wrong deprecation message on after_callbacks_if_terminated: 2020-03-03 16:17:55 -04:00
exceptions.rb fix typo in Active Job exceptions docs 2020-07-18 11:05:35 +01:00
execution.rb Fix AJ wrong deprecation message on after_callbacks_if_terminated: 2020-03-03 16:17:55 -04:00
gem_version.rb Start Rails 6.1 development 2019-04-24 15:57:14 -04:00
instrumentation.rb ActiveSupport::Calbacks#halted_callback_hook receive callback name: 2020-03-03 16:17:55 -04:00
log_subscriber.rb Move require active_support/core_ext/string/filters to 2020-09-24 00:36:09 +05:30
logging.rb Move require active_support/core_ext/string/filters to 2020-09-24 00:36:09 +05:30
queue_adapter.rb Remove errant default option 2019-09-24 14:08:09 -04:00
queue_adapters.rb Sanitize and add missing docs on ActiveJob::QueueAdapters class. [ci skip] 2020-03-22 11:28:03 +01:00
queue_name.rb Stop queue_name_prefix from being global 2019-09-13 18:30:19 -03:00
queue_priority.rb [Active Job] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
railtie.rb Destroy associations in a background job. 2020-09-24 14:24:15 -04:00
serializers.rb Serialize classes and modules with ActiveJob 2019-09-09 16:45:12 -04:00
test_case.rb [Active Job] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
test_helper.rb Support procs for assert_{enqueued,performed}_with 2020-05-07 15:36:41 -05:00
timezones.rb Remove passing extra arguments to ActiveJob Callbacks 2018-02-23 00:58:00 +02:00
translation.rb Remove passing extra arguments to ActiveJob Callbacks 2018-02-23 00:58:00 +02:00
version.rb [Active Job] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00