hirefire-resource 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/hirefire-resource.gemspec +7 -1
- data/lib/hirefire/macro/que.rb +10 -3
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c7c314af60ca51b3e19880d4f676a5e07ecb5625d8078b7200827a9b2c9338b
|
4
|
+
data.tar.gz: 486392f48c5986bdf100c03a2047496a840c788ffc2af2e27712d41ce6c6cc0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c10d31c05160fcd258c804e9e7e1ca9d4e608d71ef0a579255f03cac37c2f50b5a81e4c8ea9c24abf57179c3e0e86c5616a0855cee52561eb793d2957608edd2
|
7
|
+
data.tar.gz: b44fd34a1ec5395d2734745e1f72b6a189f37aa285d67177e19764619de1c4770d6a6f40d133cc02e6e3285cc781761df03b9cfb63916974731d2de02325d023
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
## v0.7.
|
1
|
+
## v0.7.5/Master
|
2
|
+
|
3
|
+
* Fix compatibility issue with Que 1.x (backwards-compatible with Que 0.x).
|
4
|
+
|
5
|
+
## v0.7.4
|
2
6
|
|
3
7
|
* Attempt to fix an issue where the STDOUT IO Stream has been closed for an unknown reason.
|
4
8
|
* This resulted in errors in an application with `log_queue_metrics` enabled after a random period of time.
|
data/hirefire-resource.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "hirefire-resource"
|
5
|
-
gem.version = "0.7.
|
5
|
+
gem.version = "0.7.5"
|
6
6
|
gem.platform = Gem::Platform::RUBY
|
7
7
|
gem.authors = "Michael van Rooijen"
|
8
8
|
gem.email = "michael@hirefire.io"
|
@@ -10,6 +10,12 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.summary = "Autoscaling for your Heroku dynos"
|
11
11
|
gem.description = "Load- and schedule-based scaling for web- and worker dynos"
|
12
12
|
gem.licenses = ["Apache License"]
|
13
|
+
gem.metadata = {
|
14
|
+
"homepage_uri" => "https://www.hirefire.io",
|
15
|
+
"changelog_uri" => "https://github.com/hirefire/hirefire-resource/blob/master/CHANGELOG.md",
|
16
|
+
"source_code_uri" => "https://github.com/hirefire/hirefire-resource/",
|
17
|
+
"bug_tracker_uri" => "https://github.com/hirefire/hirefire-resource/issues",
|
18
|
+
}
|
13
19
|
|
14
20
|
gem.files = %x[git ls-files].split("\n")
|
15
21
|
gem.executables = ["hirefire", "hirefireapp"]
|
data/lib/hirefire/macro/que.rb
CHANGED
@@ -19,10 +19,17 @@ FROM que_jobs WHERE run_at < now() }.freeze
|
|
19
19
|
# @param [String] queue the queue name to count. (default: nil # gets all queues)
|
20
20
|
# @return [Integer] the number of jobs in the queue(s).
|
21
21
|
#
|
22
|
-
def queue(
|
23
|
-
query =
|
22
|
+
def queue(*queues)
|
23
|
+
query = case
|
24
|
+
when queues.none? then QUERY
|
25
|
+
when queues.one? then "#{QUERY} AND queue = '#{queues.first}'"
|
26
|
+
else
|
27
|
+
queue_names = queues.map { |queue| "'#{queue}'" }.join(', ')
|
28
|
+
%Q{#{QUERY} AND queue IN (#{queue_names})}
|
29
|
+
end
|
30
|
+
|
24
31
|
results = ::Que.execute(query).first
|
25
|
-
results["total"].to_i
|
32
|
+
(results[:total] || results["total"]).to_i
|
26
33
|
end
|
27
34
|
end
|
28
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hirefire-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van Rooijen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Load- and schedule-based scaling for web- and worker dynos
|
14
14
|
email: michael@hirefire.io
|
@@ -41,8 +41,12 @@ files:
|
|
41
41
|
homepage: https://www.hirefire.io
|
42
42
|
licenses:
|
43
43
|
- Apache License
|
44
|
-
metadata:
|
45
|
-
|
44
|
+
metadata:
|
45
|
+
homepage_uri: https://www.hirefire.io
|
46
|
+
changelog_uri: https://github.com/hirefire/hirefire-resource/blob/master/CHANGELOG.md
|
47
|
+
source_code_uri: https://github.com/hirefire/hirefire-resource/
|
48
|
+
bug_tracker_uri: https://github.com/hirefire/hirefire-resource/issues
|
49
|
+
post_install_message:
|
46
50
|
rdoc_options: []
|
47
51
|
require_paths:
|
48
52
|
- lib
|
@@ -58,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
62
|
version: '0'
|
59
63
|
requirements: []
|
60
64
|
rubygems_version: 3.1.2
|
61
|
-
signing_key:
|
65
|
+
signing_key:
|
62
66
|
specification_version: 4
|
63
67
|
summary: Autoscaling for your Heroku dynos
|
64
68
|
test_files: []
|