queue-bus 0.13.2 → 0.13.4

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
  SHA256:
3
- metadata.gz: 48a236d7a44dafb099dc3d36e5f34e4a1f065d47fa76b3be1a7465ae8533773b
4
- data.tar.gz: c2e6cffeba50ae36e13c8c417f43c7b9f18ff09772c4fd3ffd48e2784a80d5d9
3
+ metadata.gz: c9f2780a64fb58183307da089ce28323668aa50ad5186122d0780bac1757a938
4
+ data.tar.gz: 70383c0bd4aa2a407163d2b59fba48c88407663a403c34cafd883a20645270dd
5
5
  SHA512:
6
- metadata.gz: 7c3ba54737925161ec4c658864a7badd08f58400e246f31ee31a2aef7a6347005f073f62c2a3874aaf4e64f11a3da7f0a2fff322997e0a99da9b7901079e320a
7
- data.tar.gz: 26b7011be9db57d5f2c93f397fda77374f8aa34fa097efc93d3831ce1832a3c1e12913433e507cf2c8e5c1057178e71b08a3fdbcee68fe382597b8bd3828f603
6
+ metadata.gz: 213245fa416d55313a4fba001fe50b6ea1d28da070e271536143da0014f7ad5ad99ac3a36875a831fa7d41dac74216459dbfbf20c2e25aa9642ab0b33ce803a3
7
+ data.tar.gz: 1803b1b83fa49f1216bd7dd7cf51db9f3434233f74d4f33d9bc75e43a34f8d3f9133ee9eface9205fc42a707c9ecf42cdbc266d1010bcb3ef34c366d00bdc506
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.13.4]
10
+ - Removes sadd usage in favor of sadd?
11
+
12
+ ## [0.13.3]
13
+ - modifies `queuebus:unsubscribe` to decommission only the specified application when passed exactly one argument.
14
+
9
15
  ## [0.13.2]
10
16
 
11
17
  ### Fixes
@@ -39,7 +39,7 @@ module QueueBus
39
39
  # Used internally to keep track of which queues we've created.
40
40
  # Don't call this directly.
41
41
  def watch_queue(queue)
42
- redis { |redis| redis.sadd(:queues, queue.to_s) }
42
+ redis { |redis| redis.sadd?(:queues, queue.to_s) }
43
43
  end
44
44
 
45
45
  # Used internally to stuff the item into the schedule sorted list.
@@ -54,7 +54,7 @@ module QueueBus
54
54
 
55
55
  # make it the real one
56
56
  redis.rename(temp_key, redis_key)
57
- redis.sadd(self.class.app_list_key, app_key)
57
+ redis.sadd?(self.class.app_list_key, app_key)
58
58
 
59
59
  redis.hgetall(redis_key).inspect if log
60
60
  end
@@ -31,6 +31,13 @@ module QueueBus
31
31
  log " ...done"
32
32
  end
33
33
 
34
+ def unsubscribe_app!(app_key)
35
+ log "Removing all subscriptions for #{app_key}"
36
+ app = ::QueueBus::Application.new(app_key)
37
+ app.unsubscribe
38
+ log " ...done"
39
+ end
40
+
34
41
  def unsubscribe!
35
42
  count = 0
36
43
  ::QueueBus.dispatchers.each do |dispatcher|
@@ -20,8 +20,9 @@ namespace :queuebus do
20
20
 
21
21
  if app_key && queue
22
22
  manager.unsubscribe_queue!(app_key, queue)
23
+ elsif app_key
24
+ manager.unsubscribe_app!(app_key)
23
25
  else
24
- manager = ::QueueBus::TaskManager.new(true)
25
26
  count = manager.unsubscribe!
26
27
  puts "No subscriptions unsubscribed" if count == 0
27
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QueueBus
4
- VERSION = '0.13.2'
4
+ VERSION = '0.13.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue-bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Leonard
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-11-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: multi_json
@@ -159,7 +158,6 @@ files:
159
158
  homepage: ''
160
159
  licenses: []
161
160
  metadata: {}
162
- post_install_message:
163
161
  rdoc_options: []
164
162
  require_paths:
165
163
  - lib
@@ -174,8 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
172
  - !ruby/object:Gem::Version
175
173
  version: '0'
176
174
  requirements: []
177
- rubygems_version: 3.0.3
178
- signing_key:
175
+ rubygems_version: 3.6.9
179
176
  specification_version: 4
180
177
  summary: A simple event bus on top of background queues
181
178
  test_files: