elastic_beans 1.0.1 → 1.1.0
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 +6 -4
- data/lib/elastic_beans/version.rb +1 -1
- 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: 1304b62b8e94e71c473dbfd82c8ca925076330ee
|
4
|
+
data.tar.gz: 1a0ede081f5d77071039d0591bd3a982d286c125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fae1a0b942fec317e9d0cf5cfde5b2ce4a70982b6965242a105ecd93009b325f1767f5685158f98a28e9b5b12e888b6fc4730917c73089b12382a41b85901c7
|
7
|
+
data.tar.gz: fddb30ed342dacf0091b913480d7419dbd3e3c4caaf174d54d58a0e0e56b9912f76aa9578d3ee301f236fb75bc0ed6ce285402ccbb5992c510aba60d24654bb0
|
@@ -119,7 +119,7 @@ module ElasticBeans
|
|
119
119
|
# Does not wait for action to be taken, but returns immediately after enqueuing the command.
|
120
120
|
#
|
121
121
|
# Raises an error if the exec environment or queue cannot be found, or if access is denied.
|
122
|
-
def enqueue_command(command)
|
122
|
+
def enqueue_command(command, delay_seconds: nil)
|
123
123
|
if environments.none? { |environment| environment.is_a?(Environment::Exec) }
|
124
124
|
raise MissingExecEnvironmentError.new(application: self)
|
125
125
|
end
|
@@ -127,12 +127,14 @@ module ElasticBeans
|
|
127
127
|
if command.to_s == command
|
128
128
|
command = Exec::Command.new(command_string: command)
|
129
129
|
end
|
130
|
-
|
131
130
|
register_command(command)
|
132
|
-
|
131
|
+
|
132
|
+
message = {
|
133
133
|
queue_url: exec_queue_url,
|
134
134
|
message_body: command.to_json,
|
135
|
-
|
135
|
+
}
|
136
|
+
message[:delay_seconds] = delay_seconds if delay_seconds
|
137
|
+
sqs.send_message(message)
|
136
138
|
end
|
137
139
|
|
138
140
|
# Fetches up to 100 previously-enqueued commands that are running or scheduled to run.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_beans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Stegman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|