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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 584079d81fb75b0722711e233398a83cdcd47613
4
- data.tar.gz: cbc6c5b0743571b24f66587592f8314eb4ce30fd
3
+ metadata.gz: 1304b62b8e94e71c473dbfd82c8ca925076330ee
4
+ data.tar.gz: 1a0ede081f5d77071039d0591bd3a982d286c125
5
5
  SHA512:
6
- metadata.gz: d13a1e14bf7dfdab4ccc54ab2f26a1a5516472fec3a7adebd12ca09f322fcd4adc5f0a81d57c6e83b4e54ffbb2799adc18fd087299615a1039dc09f674833851
7
- data.tar.gz: fe2ec7bada5f4f13727a05d5bbac64c4f735f7cd2207c4bd664f4356bf86d8293fc92336f2573ddf357016b183eeda415699a52a11b0858617f91c9a2521bc15
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
- sqs.send_message(
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.
@@ -1,3 +1,3 @@
1
1
  module ElasticBeans
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
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.1
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: 2017-11-29 00:00:00.000000000 Z
11
+ date: 2018-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk