logstash-input-azureblob 0.9.10 → 0.9.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3d707b40498cf41aff368f405137d3997abf0e3
4
- data.tar.gz: 933fb461fa056eef0f8122a91eabc899781d9ac4
3
+ metadata.gz: b7d6623db4c54c7b7738b62fba3cc60d2d8a8025
4
+ data.tar.gz: 3276b15d9a23eeb1fd3f8fb5a8f0d5be0a88d2cd
5
5
  SHA512:
6
- metadata.gz: e21058e38226798a4b2ff8089e6e84a80fba966b1e2909c02a9f6bb109120426e7bbb7d377a876f393421c05b4f81fb92a62b8f6d82f890e8d90fe6e5695dff4
7
- data.tar.gz: e63cf4d75d6310ebf8964d52ba546eb4a0bd325510e40af990862e327d16bfb2618c1a238c70fbc3f4227c222d0d19da79146abbdb9f84218226560716318a2b
6
+ metadata.gz: e84d868cbce5d306e8a116caee3614a848d799071a2f3f61b5d7299f0d31ad98164a4f05bed417cb1e4465878ec4cbafd719e8e143d7d7c174402859cc424607
7
+ data.tar.gz: eb7c30b0211e37a44df530c2ae2464a742acb804656ade6d0c6de5b3b4187d7d72946cdc1c2debe9531cc9f01cddde0b4bcd058c5aeb3585d8e0071b459b9619
@@ -277,7 +277,7 @@ end #def get_jsons!
277
277
  @blob_list_page_size = 100 if @blob_list_page_size <= 0
278
278
  loop do
279
279
  # Need to limit the returned number of the returned entries to avoid out of memory exception.
280
- entries = @azure_blob.list_blobs(@container, { :timeout => 10, :marker => continuation_token, :max_results => @blob_list_page_size })
280
+ entries = @azure_blob.list_blobs(@container, { :timeout => 60, :marker => continuation_token, :max_results => @blob_list_page_size })
281
281
  entries.each do |entry|
282
282
  blobs << entry
283
283
  end # each
@@ -312,20 +312,24 @@ end #def get_jsons!
312
312
 
313
313
  # Acquire a lease on a blob item with retries.
314
314
  #
315
- # By default, it will retry 30 times with 1 second interval.
316
- def acquire_lease(blob_name, retry_times = 30, interval_sec = 1)
315
+ # By default, it will retry 60 times with 1 second interval.
316
+ def acquire_lease(blob_name, retry_times = 60, interval_sec = 1)
317
317
  lease = nil;
318
318
  retried = 0;
319
319
  while lease.nil? do
320
320
  begin
321
- lease = @azure_blob.acquire_blob_lease(@container, blob_name, { :timeout => 10, :duration => @registry_lease_duration })
321
+ lease = @azure_blob.acquire_blob_lease(@container, blob_name, { :timeout => 60, :duration => @registry_lease_duration })
322
322
  rescue StandardError => e
323
- if(e.type == 'LeaseAlreadyPresent')
324
- if (retried > retry_times)
325
- raise
326
- end
327
- retried += 1
328
- sleep interval_sec
323
+ if(e.type && e.type == 'LeaseAlreadyPresent')
324
+ if (retried > retry_times)
325
+ raise
326
+ end
327
+ retried += 1
328
+ sleep interval_sec
329
+ else
330
+ # Anything else happend other than 'LeaseAlreadyPresent', break the lease. This is a work-around for the behavior that when
331
+ # timeout exception is hit, somehow, a infinite lease will be put on the lock file.
332
+ @azure_blob.break_blob_lease(@container, blob, { :break_period => 30 })
329
333
  end
330
334
  end
331
335
  end #while
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-azureblob'
3
- s.version = '0.9.10'
3
+ s.version = '0.9.11'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'This plugin collects Microsoft Azure Diagnostics data from Azure Storage Blobs.'
6
6
  s.description = 'This gem is a Logstash plugin. It reads and parses data from Azure Storage Blobs.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-azureblob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-18 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement