AfterCommitQueue#run_after_commit_or_now does not correctly support multiple databases

Problem with AfterCommitQueue#run_after_commit_or_now

  1. It uses ApplicationRecord and ApplicationRecord::Base so it will not work correctly for Ci::ApplicationRecord models

Follow-up

  1. Transactional problems with run_after_commit_or_now, moved to #347516
Edited by Thong Kuah