cloud66_agent 0.0.1.pre5 → 0.0.1.pre6

Sign up to get free protection for your applications and to get access to all the features.
data/bin/cloud66_agent CHANGED
@@ -80,7 +80,7 @@ else
80
80
  else
81
81
  Cloud66Agent.send(command, arguments)
82
82
  end
83
- rescue ArgumentError => exc
83
+ rescue ArgumentError
84
84
  $logger.error "Invalid command/arguments: #{command} #{arguments}"
85
85
  exit -1
86
86
  end
@@ -3,16 +3,15 @@ require 'cloud66_agent/utils/server'
3
3
  module Cloud66
4
4
  module Commands
5
5
  class JobEnd
6
- def self.perform(status, job_uid, session_uid, execution_time, results_file)
7
- job_results = File.exists?(results_file) ? IO.read(results_file) : ''
6
+ def self.perform(status, job_uid, session_uid, run_time, results_file)
7
+ job_results = File.exists?(results_file) ? IO.readlines(results_file) : []
8
8
  data = {
9
9
  status: status,
10
10
  session_uid: session_uid,
11
- execution_time: execution_time,
11
+ run_time: run_time,
12
12
  job_results: job_results
13
13
  }
14
14
  Utils::Server.send_job_end(job_uid, data)
15
- exit 0
16
15
  rescue => exc
17
16
  $logger.error "'job_end' failed: #{exc.message}"
18
17
  exit -1
@@ -45,7 +45,7 @@ module Cloud66
45
45
  if parsed_response['shut_down']
46
46
  $config.disabled = true
47
47
  $config.save
48
- exit -1
48
+ exit 86
49
49
  elsif parsed_response.has_key?('error')
50
50
  raise parsed_response['error']
51
51
  else
@@ -16,7 +16,7 @@ module Cloud66
16
16
  MAJOR, MINOR, PATCH = 0, 0, 1
17
17
 
18
18
  #ie. PRERELEASE_MODIFIER = 'beta1'
19
- PRERELEASE_MODIFIER = "pre5"
19
+ PRERELEASE_MODIFIER = "pre6"
20
20
 
21
21
  ##
22
22
  # Returns the major version ( big release based off of multiple minor releases )
data/lib/cloud66_agent.rb CHANGED
@@ -28,9 +28,9 @@ class Cloud66Agent
28
28
  status = args[0]
29
29
  job_uid = args[1]
30
30
  session_uid = args[2]
31
- execution_time = args[3]
31
+ run_time = args[3]
32
32
  results_file = args[4]
33
- raise ArgumentError.new if status.nil? || job_uid.nil? || session_uid.nil? || execution_time.nil? || results_file.nil?
34
- Cloud66::Commands::JobEnd.perform(status, job_uid, session_uid, execution_time, results_file)
33
+ raise ArgumentError.new if status.nil? || job_uid.nil? || session_uid.nil? || run_time.nil? || results_file.nil?
34
+ Cloud66::Commands::JobEnd.perform(status, job_uid, session_uid, run_time, results_file)
35
35
  end
36
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud66_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre5
4
+ version: 0.0.1.pre6
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: