nfagent 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,5 +30,5 @@ require 'nfagent/server'
30
30
  require 'nfagent/cli'
31
31
 
32
32
  module NFAgent
33
- VERSION = '0.9.10'
33
+ VERSION = '0.9.11'
34
34
  end
@@ -29,6 +29,7 @@ module NFAgent
29
29
  # TODO: Is this the right place for compression, encoding and check summing? Perhaps it should go into the submitter to that it can be deferred
30
30
  def dump
31
31
  Payload.new do |payload|
32
+ Log.info("Dumping payload from chunk (#{@array.size} lines)")
32
33
  payload.data = Encoder.encode64url(Zlib::Deflate.deflate(@array.join("\n"), Zlib::BEST_COMPRESSION))
33
34
  payload.checksum = Digest::SHA1.hexdigest(payload.data)
34
35
  end
@@ -36,6 +37,7 @@ module NFAgent
36
37
 
37
38
  def clear
38
39
  @array.clear
40
+ @created_at = Time.now
39
41
  end
40
42
  end
41
43
  end
@@ -18,7 +18,11 @@ module NFAgent
18
18
  end
19
19
 
20
20
  def check_full_or_expired
21
- if @chunk.full? || @chunk.expired?
21
+ if @chunk.full?
22
+ Log.info("Chunk Full: Resetting...")
23
+ reset_chunk
24
+ elsif @chunk.expired?
25
+ Log.info("Chunk Expired: Resetting...")
22
26
  reset_chunk
23
27
  end
24
28
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 10
9
- version: 0.9.10
8
+ - 11
9
+ version: 0.9.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Draper
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-02 00:00:00 +09:30
17
+ date: 2010-08-03 00:00:00 +09:30
18
18
  default_executable: nfagent
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency