nfagent 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ $hoe = Hoe.spec('nfagent') do |p|
11
11
  p.post_install_message = 'PostInstall.txt'
12
12
  p.rubyforge_name = p.name
13
13
  p.extra_deps = [
14
- ['svutil','>= 0.0.6'], ['eventmachine', '>= 0.12.8']
14
+ ['svutil','>= 0.0.11'], ['eventmachine', '>= 0.12.8']
15
15
  ]
16
16
  p.extra_dev_deps = [
17
17
  ['newgem', ">= #{::Newgem::VERSION}"]
@@ -30,5 +30,5 @@ require 'nfagent/server'
30
30
  require 'nfagent/cli'
31
31
 
32
32
  module NFAgent
33
- VERSION = '0.9.5'
33
+ VERSION = '0.9.6'
34
34
  end
@@ -6,13 +6,15 @@ module NFAgent
6
6
  proxy_class = Net::HTTP::Proxy(Config.proxy.host, Config.proxy.port, Config.proxy.user, Config.proxy.password)
7
7
  # TODO: Enable SSL
8
8
  proxy_class.start(SERVICE_HOST, 80) do |http|
9
+ http.read_timeout = 240 # 4 minutes TODO: Make this a config option with 240 as default
9
10
  req = Net::HTTP::Post.new("/#{end_point}")
10
11
  req.set_form_data(data_hash.merge("key" => Config.client_key))
11
12
  ClientResponse.new do |resp|
12
13
  resp.response, resp.message = http.request(req)
13
14
  end
14
15
  end
15
- rescue
16
+ rescue Exception => e
17
+ # Trap Exception class here to ensure we catch Timeout
16
18
  ClientResponse.new do |resp|
17
19
  resp.message = $!
18
20
  end
@@ -6,21 +6,23 @@ module NFAgent
6
6
  poller = Poller.new
7
7
 
8
8
  EM.run {
9
+ EM.start_server "0.0.0.0", 10000, Event, chunk_handler, poller
9
10
  EM::PeriodicTimer.new(5) do
10
11
  chunk_handler.check_full_or_expired
11
12
  end
12
- EM::PeriodicTimer.new(60) do
13
- Submitter.resubmit_failed_dumps
14
- end
15
13
  EM::PeriodicTimer.new(120) do
16
14
  poller.send_heartbeat
17
15
  end
18
- EM.start_server "0.0.0.0", 10000, Event, chunk_handler, poller
16
+ EM::fork_reactor do
17
+ EM::PeriodicTimer.new(60) do
18
+ Submitter.resubmit_failed_dumps
19
+ end
20
+ end
19
21
  }
20
22
  end
21
23
 
22
24
  def shutdown
23
- EM::stop_event_loop
25
+ EM::stop_event_loop if EM::reactor_running?
24
26
  end
25
27
  end
26
28
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 5
9
- version: 0.9.5
8
+ - 6
9
+ version: 0.9.6
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-07-12 00:00:00 +09:30
17
+ date: 2010-07-24 00:00:00 +09:30
18
18
  default_executable: nfagent
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -27,8 +27,8 @@ dependencies:
27
27
  segments:
28
28
  - 0
29
29
  - 0
30
- - 6
31
- version: 0.0.6
30
+ - 11
31
+ version: 0.0.11
32
32
  type: :runtime
33
33
  version_requirements: *id001
34
34
  - !ruby/object:Gem::Dependency
@@ -68,9 +68,9 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  segments:
70
70
  - 2
71
- - 4
71
+ - 6
72
72
  - 0
73
- version: 2.4.0
73
+ version: 2.6.0
74
74
  type: :development
75
75
  version_requirements: *id004
76
76
  description: Logging Agent for NetFox Online