hirefire-resource 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: affa2055a22d9ebc019b20ddace8e5fe042bd7c04115735d88fac5710458eb1d
4
- data.tar.gz: d5b2aa9fade2670ca74f1af8e3ed3ba76cfb0b520d0794077f1e0e0bc5e8459b
3
+ metadata.gz: a071158b508eb303b36e2e62e11ef4acfd104b4d3c2fb1431ce042587ce1c6e4
4
+ data.tar.gz: 8393b0eaf605fd706980506413d0424b5cf003d337e4930f8280cbf386602c22
5
5
  SHA512:
6
- metadata.gz: 5f3455375d6259f6d1142056af6c3285fcbfe6aafeac6e0d92778b49e9a2818378edebe6d68f6cecf74522e11b78932361f69c5fe4328ca3768937a42a7541ed
7
- data.tar.gz: aad73cc64b02064a4b8d4bd451f578415939300dcaeed6345315bcff99268943c70d774c820d591b7deaa6afd60edeee1c2fd64928847078111f4ccd8c6fafb9
6
+ metadata.gz: e24741c9418227b9264499f9216af379f01f6036a8926ad0093f2412b09c83bafa0b276929d9388c9c05f08584c67714d39676b6675e4ae65b0b251f353884c5
7
+ data.tar.gz: 0fa7878f1f5c005928dbb26def63f11f0ad18b9bb425512eb6d37a922c407b05b5d81cfe651428c59be040c3f11b4c4b3f5df6057c4b1372b829f102a068114e
@@ -10,7 +10,7 @@ jobs:
10
10
  - name: Set up Ruby
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
- ruby-version: 3.0.2
13
+ ruby-version: 3.1
14
14
  bundler-cache: true
15
15
  - name: Run standardrb
16
- run: bundle exec rake standard
16
+ run: bin/rake standard
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.10.1
2
+
3
+ * Add redis 5 (gem) support to HireFire::Macro::Resque
4
+
1
5
  ## v0.10.0
2
6
 
3
7
  * Support Latency (Sidekiq)
data/Gemfile.lock CHANGED
@@ -1,42 +1,45 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hirefire-resource (0.9.1)
4
+ hirefire-resource (0.10.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
- parallel (1.21.0)
11
- parser (3.0.3.2)
10
+ json (2.6.2)
11
+ parallel (1.22.1)
12
+ parser (3.1.2.1)
12
13
  ast (~> 2.4.1)
13
- rainbow (3.0.0)
14
+ rainbow (3.1.1)
14
15
  rake (13.0.6)
15
- regexp_parser (2.2.0)
16
+ regexp_parser (2.6.0)
16
17
  rexml (3.2.5)
17
- rubocop (1.23.0)
18
+ rubocop (1.35.1)
19
+ json (~> 2.3)
18
20
  parallel (~> 1.10)
19
- parser (>= 3.0.0.0)
21
+ parser (>= 3.1.2.1)
20
22
  rainbow (>= 2.2.2, < 4.0)
21
23
  regexp_parser (>= 1.8, < 3.0)
22
- rexml
23
- rubocop-ast (>= 1.12.0, < 2.0)
24
+ rexml (>= 3.2.5, < 4.0)
25
+ rubocop-ast (>= 1.20.1, < 2.0)
24
26
  ruby-progressbar (~> 1.7)
25
27
  unicode-display_width (>= 1.4.0, < 3.0)
26
- rubocop-ast (1.15.0)
27
- parser (>= 3.0.1.1)
28
- rubocop-performance (1.12.0)
28
+ rubocop-ast (1.22.0)
29
+ parser (>= 3.1.1.0)
30
+ rubocop-performance (1.14.3)
29
31
  rubocop (>= 1.7.0, < 2.0)
30
32
  rubocop-ast (>= 0.4.0)
31
33
  ruby-progressbar (1.11.0)
32
- standard (1.5.0)
33
- rubocop (= 1.23.0)
34
- rubocop-performance (= 1.12.0)
35
- standardrb (1.0.0)
34
+ standard (1.16.1)
35
+ rubocop (= 1.35.1)
36
+ rubocop-performance (= 1.14.3)
37
+ standardrb (1.0.1)
36
38
  standard
37
- unicode-display_width (2.1.0)
39
+ unicode-display_width (2.3.0)
38
40
 
39
41
  PLATFORMS
42
+ arm64-darwin-21
40
43
  x86_64-darwin-20
41
44
  x86_64-linux
42
45
 
data/bin/rake ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rake", "rake")
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "hirefire-resource"
3
- spec.version = "0.10.0"
3
+ spec.version = "0.10.1"
4
4
  spec.platform = Gem::Platform::RUBY
5
5
  spec.authors = "Michael van Rooijen"
6
6
  spec.email = "michael@hirefire.io"
@@ -65,9 +65,9 @@ module HireFire
65
65
 
66
66
  def count_messages(channel, queue_names, options)
67
67
  queue_names.inject(0) do |sum, queue_name|
68
- queue = if options.key?(:'x-max-priority')
68
+ queue = if options.key?(:"x-max-priority")
69
69
  channel.queue(queue_name, durable: options[:durable],
70
- arguments: {"x-max-priority" => options[:'x-max-priority']})
70
+ arguments: {"x-max-priority" => options[:"x-max-priority"]})
71
71
  else
72
72
  channel.queue(queue_name, durable: options[:durable])
73
73
  end
@@ -23,10 +23,12 @@ module HireFire
23
23
 
24
24
  redis = ::Resque.redis
25
25
  ids = Array(redis.smembers(:workers)).compact
26
- raw_jobs = redis.pipelined { ids.map { |id| redis.get("worker:#{id}") } }
26
+ raw_jobs = redis.pipelined do |redis|
27
+ ids.map { |id| redis.get("worker:#{id}") }
28
+ end
27
29
  jobs = raw_jobs.map { |raw_job| ::Resque.decode(raw_job) || {} }
28
30
 
29
- in_queues = redis.pipelined do
31
+ in_queues = redis.pipelined do |redis|
30
32
  queues.map { |queue| redis.llen("queue:#{queue}") }
31
33
  end.map(&:to_i).inject(&:+)
32
34
 
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.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-10-20 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
@@ -24,6 +24,7 @@ files:
24
24
  - LICENSE
25
25
  - README.md
26
26
  - Rakefile
27
+ - bin/rake
27
28
  - hirefire-resource.gemspec
28
29
  - lib/hirefire-resource.rb
29
30
  - lib/hirefire/macro/bunny.rb
@@ -60,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0'
62
63
  requirements: []
63
- rubygems_version: 3.2.22
64
+ rubygems_version: 3.3.11
64
65
  signing_key:
65
66
  specification_version: 4
66
67
  summary: Autoscaling for your Heroku dynos