Non blocking event dispatch (#652)

- Performance improvements for event dispatch
This commit is contained in:
Subin T P
2020-03-29 19:18:30 +05:30
committed by GitHub
parent bab9d663d2
commit e56132c506
6 changed files with 61 additions and 2 deletions

View File

@@ -6,6 +6,16 @@ describe ::V2::ReportBuilder do
let!(:inbox) { create(:inbox, account: account) }
let(:inbox_member) { create(:inbox_member, user: user, inbox: inbox) }
# Running jobs inline to calculate the exact metrics
around do |test|
current_adapter = ActiveJob::Base.queue_adapter
ActiveJob::Base.queue_adapter = :inline
test.run
ensure
ActiveJob::Base.queue_adapter = current_adapter
end
describe '#timeseries' do
context 'when report type is account' do
before do