Prevent Long Transactions with after_save_commit for Heavy Work

8849
0

Heavy work inside a transaction increases lock time and deadlock risk. Use after_save_commit to schedule slow tasks (thumb generation, external sync) once the write is durable.