elastic_beans 0.10.0.alpha7 → 0.10.0.alpha8
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/elastic_beans/application.rb +1 -2
- data/lib/elastic_beans/cli.rb +1 -0
- data/lib/elastic_beans/command/ps.rb +9 -2
- data/lib/elastic_beans/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 843741dfe28731c105f2cff03af109344d6a9f73
|
4
|
+
data.tar.gz: 71f309179d84ab04bc50b1bf8eee1dd04d0dd349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 850f886ad6834f9af32a6145e9806ee3d8abb422b500b017d59d31cb799265934851cf0d59ee29764ae410a835a30665d338047633155ca738db04240f441d14
|
7
|
+
data.tar.gz: 120afffc8bcab1a865cb5cb50eec609aed620c6acd21b144839d2b93ecb6fe52a58f6fc0e67dc60bdb00ca5d9115f3f482ad3a9a04b6cbac2a2a5e41c31a74ac
|
@@ -157,8 +157,7 @@ module ElasticBeans
|
|
157
157
|
end
|
158
158
|
|
159
159
|
response = s3.get_object(bucket: bucket_name, key: object.key)
|
160
|
-
|
161
|
-
commands << command unless command.freeze_instance?
|
160
|
+
commands << ElasticBeans::Exec::Command.from_json(response.body.read)
|
162
161
|
# skip finished or invalid commands
|
163
162
|
rescue ::Aws::S3::Errors::NoSuchKey
|
164
163
|
rescue JSON::ParserError
|
data/lib/elastic_beans/cli.rb
CHANGED
@@ -29,15 +29,18 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
|
|
29
29
|
SCHEDULED_INSTANCE = "scheduled"
|
30
30
|
SCHEDULED_RUN_TIME = "00:00:00"
|
31
31
|
|
32
|
-
def initialize(application:, ui:)
|
32
|
+
def initialize(application:, show_all:, ui:)
|
33
33
|
@application = application
|
34
|
+
@show_all = show_all
|
34
35
|
@ui = ui
|
35
36
|
end
|
36
37
|
|
37
38
|
def run
|
38
39
|
ui.debug { "Fetching enqueued commands from #{application.name}..." }
|
39
40
|
enqueued_commands = application.enqueued_commands
|
40
|
-
|
41
|
+
if !show_all?
|
42
|
+
enqueued_commands.reject!(&:freeze_instance?)
|
43
|
+
end
|
41
44
|
|
42
45
|
enqueued_commands, running_commands = enqueued_commands.partition { |cmd| cmd.start_time.nil? }
|
43
46
|
running_commands.sort_by!(&:start_time)
|
@@ -52,6 +55,10 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
|
|
52
55
|
private
|
53
56
|
|
54
57
|
attr_reader :application, :ui
|
58
|
+
|
59
|
+
def show_all?
|
60
|
+
@show_all
|
61
|
+
end
|
55
62
|
end
|
56
63
|
end
|
57
64
|
end
|