From 32d6a7e1e484ed2c17996e8b42a1f069eaf1c0d5 Mon Sep 17 00:00:00 2001 From: Kirill Shevchenko Date: Mon, 22 Jul 2019 23:17:14 +0300 Subject: [PATCH] add temp solution for async slack notifications --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- lib/query_track/notifications/slack.rb | 2 +- lib/query_track/version.rb | 2 +- spec/query_track/notifications/slack_spec.rb | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e785ebe..b670fbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v0.0.4 2019-07-22 + +Added temp solution for async slack notifications. ([kirillshevch](https://github.com/kirillshevch/query_track/pull/5)) + # v0.0.3 2019-07-22 Added backtrace filters. ([kirillshevch](https://github.com/kirillshevch/query_track/pull/3)) diff --git a/Gemfile.lock b/Gemfile.lock index 363df5f..9458e7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - query_track (0.0.3) + query_track (0.0.4) activesupport dry-configurable slack_hook diff --git a/lib/query_track/notifications/slack.rb b/lib/query_track/notifications/slack.rb index a8c4128..161d935 100644 --- a/lib/query_track/notifications/slack.rb +++ b/lib/query_track/notifications/slack.rb @@ -18,7 +18,7 @@ def call payload = { blocks: blocks(trace) } - slack_hook.post(payload) + Thread.new { slack_hook.post(payload) } end private diff --git a/lib/query_track/version.rb b/lib/query_track/version.rb index e921ed3..3de99da 100644 --- a/lib/query_track/version.rb +++ b/lib/query_track/version.rb @@ -1,3 +1,3 @@ module QueryTrack - VERSION = '0.0.3' + VERSION = '0.0.4' end diff --git a/spec/query_track/notifications/slack_spec.rb b/spec/query_track/notifications/slack_spec.rb index 89c834d..3a7b0a0 100644 --- a/spec/query_track/notifications/slack_spec.rb +++ b/spec/query_track/notifications/slack_spec.rb @@ -29,7 +29,7 @@ it 'should post notification to slack' do allow(SlackHook::Incoming).to receive(:new).and_return(slack_stub) - expect(slack_stub).to receive(:post) + expect(Thread).to receive(:new) subject.call end end