Skip to content
  • George Claghorn's avatar
    4cf75592
    Destroy associations in a background job. · 4cf75592
    George Claghorn authored
    
    
    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: default avatarAdrianna Chang <adrianna.chang@shopify.com>
    Co-authored-by: default avatarRafael Mendonça França <rafael@franca.dev>
    Co-authored-by: default avatarCory Gwin @gwincr11 <gwincr11@github.com>
    4cf75592
    Destroy associations in a background job.
    George Claghorn authored
    
    
    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: default avatarAdrianna Chang <adrianna.chang@shopify.com>
    Co-authored-by: default avatarRafael Mendonça França <rafael@franca.dev>
    Co-authored-by: default avatarCory Gwin @gwincr11 <gwincr11@github.com>
Loading