cloud_watch_logs_poller 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 527dec092ed98ff28cfa44f2cff0dc7f225a5dd232e8721b669b3cac615d0e44
4
- data.tar.gz: 54f4d32fe73c65249494b7b1444c1a8900c89b7dfc1c1599b36aa296aea8990e
3
+ metadata.gz: fc88f8d5963c66a36bc794f6f7a101d080342aba5d7a2577d956b39417a93e76
4
+ data.tar.gz: 9d4f3209935a3b0ceab85ab8e5842681c3804e7c8d0d99f528e5f1064c30331e
5
5
  SHA512:
6
- metadata.gz: 8092cac6c07d2b048ff85230938d1beb99178d26d69726b60ff1cbf8389bffe85aedfd2c35d779269fef69e251d7a60849f2cf8ffa4e93049fbfb2539a003c9f
7
- data.tar.gz: f3fa6a8b8b2377efee81c0f4af257c081ae222be8471d27f457d1ed2565b7381dd267c99708f076c768e8bdf39703537439b35ecc26dfd0f08d77e6f6b81e630
6
+ metadata.gz: ae1401221a8a7e900ae59fbc14b744a06184e2f58a03300d8114850c7f8d2dfcdac67b0256ef82acca352302d0fc647f28b488a0956903791a78fcd9a1b30497
7
+ data.tar.gz: e50f5a485af34912b8225f57177efa6cb5507337f81477a2be6d5ad937ba70f5597adf56b845a974daff8a72068884bc7444ede716bdb6e69dd953e4d49cca7c
@@ -4,6 +4,7 @@ module CloudWatchLogsPoller
4
4
  @client = Aws::CloudWatchLogs::Client.new
5
5
  @interval = interval
6
6
  @debug = debug
7
+ @event_ids = []
7
8
  end
8
9
 
9
10
  def execute(log_group_name:, log_stream_name_prefix: nil, filter_pattern: nil, start_time: Time.now, &block)
@@ -19,6 +20,9 @@ module CloudWatchLogsPoller
19
20
  loop do
20
21
  result = @client.filter_log_events(params)
21
22
  result.events.each do |event|
23
+ next if @event_ids.include?(event.event_id)
24
+
25
+ @event_ids << event.event_id
22
26
  block.call(Event.convert_from_filtered_log_event(event))
23
27
  end
24
28
 
@@ -1,3 +1,3 @@
1
1
  module CloudWatchLogsPoller
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_watch_logs_poller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Ooishi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-21 00:00:00.000000000 Z
11
+ date: 2019-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-cloudwatchlogs