naf 2.0.0 → 2.0.1
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.
- data/README.rdoc +2 -1
- data/RELEASE_NOTES.rdoc +9 -0
- data/app/models/logical/naf/log_parser/runner.rb +14 -2
- data/app/models/logical/naf/log_reader.rb +6 -7
- data/app/models/process/naf/log_archiver.rb +1 -1
- data/lib/naf/version.rb +1 -1
- data/naf.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -19,4 +19,5 @@ With a management console, providing:
|
|
19
19
|
|
20
20
|
=== Please find up-to-date information on Naf here: {Naf Wiki}[http://www.github.com/fiksu/naf/wiki]
|
21
21
|
|
22
|
-
=== Instructions on
|
22
|
+
=== Instructions on upgrading to Naf v1.1.4: {Instructions}[https://github.com/fiksu/naf/wiki/Upgrading-to-Naf-v1.1.4]
|
23
|
+
=== Instructions on upgrading to Naf v2.0.0: {Instructions}[https://github.com/fiksu/naf/wiki/Upgrading-to-Naf-v2.0]
|
data/RELEASE_NOTES.rdoc
CHANGED
@@ -35,7 +35,19 @@ module Logical::Naf
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def retrieve_log_files_from_s3
|
38
|
-
|
38
|
+
uuids = ::Naf::MachineRunner.
|
39
|
+
joins(:machine_runner_invocations).
|
40
|
+
where("#{Naf.schema_name}.machine_runners.id = ?", record_id).
|
41
|
+
pluck("#{Naf.schema_name}.machine_runner_invocations.uuid")
|
42
|
+
|
43
|
+
files = []
|
44
|
+
s3_log_reader.runner_log_files.each do |file|
|
45
|
+
if uuids.include?(file.scan(UUID_REGEX).first)
|
46
|
+
files << file
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
files
|
39
51
|
end
|
40
52
|
|
41
53
|
def get_invocation_id(uuid)
|
@@ -50,7 +62,7 @@ module Logical::Naf
|
|
50
62
|
if log_type == 'old' && read_from_s3 == 'true'
|
51
63
|
get_s3_files do
|
52
64
|
@s3_log_reader = ::Logical::Naf::LogReader.new
|
53
|
-
return
|
65
|
+
return retrieve_log_files_from_s3
|
54
66
|
end
|
55
67
|
else
|
56
68
|
files = Dir["#{::Naf::PREFIX_PATH}/#{::Naf.schema_name}/runners/*/*"]
|
@@ -20,9 +20,8 @@ module Logical
|
|
20
20
|
return sort_files(files)
|
21
21
|
end
|
22
22
|
|
23
|
-
def runner_log_files
|
24
|
-
|
25
|
-
tree = bucket.objects.with_prefix(prefix).as_tree
|
23
|
+
def runner_log_files
|
24
|
+
tree = bucket.objects.with_prefix(prefix(true)).as_tree
|
26
25
|
directories = tree.children.select(&:branch?).collect(&:prefix).uniq
|
27
26
|
|
28
27
|
files = []
|
@@ -58,11 +57,11 @@ module Logical
|
|
58
57
|
@bucket ||= s3.buckets[NAF_BUCKET]
|
59
58
|
end
|
60
59
|
|
61
|
-
def prefix
|
62
|
-
if
|
63
|
-
"
|
60
|
+
def prefix(runner_logs = false)
|
61
|
+
if runner_logs
|
62
|
+
"#{NAF_LOG_PATH}/#{creation_time}/#{::Naf::NAF_DATABASE_HOSTNAME}/#{::Naf::NAF_DATABASE}/#{::Naf.schema_name}/runners/"
|
64
63
|
else
|
65
|
-
"
|
64
|
+
"#{NAF_LOG_PATH}/#{creation_time}/#{::Naf::NAF_DATABASE_HOSTNAME}/#{::Naf::NAF_DATABASE}/#{::Naf.schema_name}/jobs/"
|
66
65
|
end
|
67
66
|
end
|
68
67
|
|
@@ -21,7 +21,7 @@ module Process::Naf
|
|
21
21
|
logger.info 'Starting to save files to s3...'
|
22
22
|
files.each do |file|
|
23
23
|
# Write file if not existent
|
24
|
-
object = bucket.objects["
|
24
|
+
object = bucket.objects["#{NAF_LOG_PATH}/#{creation_time}" + file[12..-1]]
|
25
25
|
if !object.exists?
|
26
26
|
# Write file to S3
|
27
27
|
result = object.write(File.open(file).read)
|
data/lib/naf/version.rb
CHANGED
data/naf.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.name = "naf"
|
9
9
|
s.version = Naf::VERSION
|
10
10
|
s.license = 'New BSD License'
|
11
|
-
s.date = '
|
11
|
+
s.date = '2014-01-03'
|
12
12
|
s.summary = "Creates infrastructure for a customizable and robust Postgres-backed script scheduling/running"
|
13
13
|
s.description = "A cloud based distributed cron, application framework and operations console. Naf works as a distributed script running " +
|
14
14
|
"system that provides scheduling, logging, alarming, machine redundancy, and the ability to set constraint during script execution"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: naf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2014-01-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|