Before starting this recording, I inserted some prints and sleep in the CloudAccount.disable method. This simulates any kind of delay that would be encountered during our current pre_delete Django signal. The diff is simply:
In two sessions, I attempt to delete “all” CloudAccount instances. Because the first session is stuck waiting in the pre_deletecode, the second session also attempts to delete the same account and ultimately breaks when it can only load part of the data.