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