![]() This allows applications to specify the maximum number of records that will be destroyed in a single background job by the `dependent: :destroy_async` association option. By default, the current behavior will remain the same: when a parent record is destroyed, all dependent records will be destroyed in a single background job. If the number of dependent records is greater than this configuration, the records will be destroyed in multiple background jobs. At GitHub, we have a custom method for destroying associated records in the background that we'd like to replace with `dependent: :destroy_async`. Some associations have a large number of dependent records, and our infrastructure requires that background jobs complete quickly, so we limit the maximum number of dependent records destroyed in a single background job and enqueue additional jobs when the number of records exceeds that limit. |
||
---|---|---|
.. | ||
active_record/connection_adapters | ||
activejob | ||
assets | ||
cases | ||
fixtures | ||
migrations | ||
models | ||
schema | ||
support | ||
config.example.yml | ||
config.rb |