nfagent 0.9.10 → 0.9.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nfagent.rb +1 -1
- data/lib/nfagent/chunk.rb +2 -0
- data/lib/nfagent/chunk_handler.rb +5 -1
- metadata +3 -3
data/lib/nfagent.rb
CHANGED
data/lib/nfagent/chunk.rb
CHANGED
@@ -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?
|
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
|
-
-
|
9
|
-
version: 0.9.
|
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-
|
17
|
+
date: 2010-08-03 00:00:00 +09:30
|
18
18
|
default_executable: nfagent
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|