genesis_framework 0.6.5 → 0.6.6
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.
- checksums.yaml +4 -4
- data/lib/genesisframework/tasks.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664e768cc3d3181cacb8c0f32431c4760fb737e9
|
4
|
+
data.tar.gz: f9ab70b373c9ccb2e3a7bdd3c5b91aa0b08b1aed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58b42a263bfe0c453b22d01c50ae29aa6d8cd8e01143a46c5b36e3161bb05f58fee923bcf6ddd636b946c942794e14e53f2b30a7558b8a44e005d03de7b88ffc
|
7
|
+
data.tar.gz: 77cace27e435c7b3289f92c71b992137e8e05e15c24a324fc971c50ff54c52f998b5d7169d7b96aac9c67e739c5f0d6d8b24f14f68e1acdc94862ab5e727e18b
|
@@ -79,7 +79,7 @@ module Genesis
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
rescue => e
|
82
|
-
|
82
|
+
task.log "task had error on testing if it needs initialization: %s" % e.message
|
83
83
|
return false
|
84
84
|
end
|
85
85
|
|
@@ -88,7 +88,7 @@ module Genesis
|
|
88
88
|
self.call_block(task.blocks, :init);
|
89
89
|
puts "task is now initialized..."
|
90
90
|
rescue => e
|
91
|
-
|
91
|
+
task.log "task threw error on initialization: %s" % e.message
|
92
92
|
return false
|
93
93
|
end
|
94
94
|
|
@@ -104,7 +104,7 @@ module Genesis
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
rescue => e
|
107
|
-
|
107
|
+
task.log "task had error on testing if it needs running: %s" % e.message
|
108
108
|
return false
|
109
109
|
end
|
110
110
|
|
@@ -112,27 +112,27 @@ module Genesis
|
|
112
112
|
task.options[:retries].each_with_index do |sleep_interval, index|
|
113
113
|
attempt = index + 1
|
114
114
|
begin
|
115
|
-
|
115
|
+
task.log "task is attempting run #%d..." % [attempt]
|
116
116
|
Timeout::timeout(task.options[:timeout]) do
|
117
117
|
success = self.call_block(task.blocks, :run)
|
118
118
|
end
|
119
119
|
# a run block should raise an error or be false for a failure
|
120
120
|
success = true if success.nil?
|
121
121
|
rescue => e
|
122
|
-
|
122
|
+
task.log "run #%d caused error: %s" % [attempt, e.message]
|
123
123
|
success = nil # cause a retry
|
124
124
|
end
|
125
125
|
break unless success.nil? # if we got an answer, we're done
|
126
|
-
|
126
|
+
task.log "task is sleeping for %d seconds..." % [sleep_interval]
|
127
127
|
Kernel.sleep(sleep_interval)
|
128
128
|
end
|
129
129
|
success = false if success.nil? # must have used all the retries, fail
|
130
130
|
|
131
131
|
if success
|
132
132
|
success = self.call_block(task.blocks, :success)
|
133
|
-
|
133
|
+
task.log "task is successful!"
|
134
134
|
else
|
135
|
-
|
135
|
+
task.log 'task failed!!!'
|
136
136
|
if self.has_block? task.blocks, :rollback
|
137
137
|
success = self.call_block(task.blocks, :rollback, "rolling back!")
|
138
138
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genesis_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Johnstone
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: genesis_promptcli
|