Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249)

This commit is contained in:
Akhil G Krishnan
2021-11-18 10:32:29 +05:30
committed by GitHub
parent 4eeaadbd5b
commit b81a9f2010
23 changed files with 90 additions and 90 deletions

View File

@@ -39,19 +39,19 @@ class Inbox < ApplicationRecord
belongs_to :channel, polymorphic: true, dependent: :destroy
has_many :campaigns, dependent: :destroy
has_many :contact_inboxes, dependent: :destroy
has_many :campaigns, dependent: :destroy_async
has_many :contact_inboxes, dependent: :destroy_async
has_many :contacts, through: :contact_inboxes
has_many :inbox_members, dependent: :destroy
has_many :inbox_members, dependent: :destroy_async
has_many :members, through: :inbox_members, source: :user
has_many :conversations, dependent: :destroy
has_many :conversations, dependent: :destroy_async
has_many :messages, through: :conversations
has_one :agent_bot_inbox, dependent: :destroy
has_one :agent_bot_inbox, dependent: :destroy_async
has_one :agent_bot, through: :agent_bot_inbox
has_many :webhooks, dependent: :destroy
has_many :hooks, dependent: :destroy, class_name: 'Integrations::Hook'
has_many :webhooks, dependent: :destroy_async
has_many :hooks, dependent: :destroy_async, class_name: 'Integrations::Hook'
after_destroy :delete_round_robin_agents