background_worker 0.6.0 → 0.7.0

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: 21cc4f8353107acd3a07a1dbb33709a5f5629e266c64ec66eee2a558d61e6614
4
- data.tar.gz: 9499f710d1e056be82da09af4c28a8229ac43e6aada29725a1d766f4638fc136
3
+ metadata.gz: 37f371795b57bf7461a9f02c9f74195daf9d3cb61328fd0eca5f69a2c61447b6
4
+ data.tar.gz: 393896f93efac8a56c0806a8664ea381fff12ff31a2e0e31c210d6a3480694b8
5
5
  SHA512:
6
- metadata.gz: f869b9563b92e17c75632b3de27946ac87939033c068c093e3060b8f062bb26abab31a3559def9fe06a6291016a9c26e764c25a6c96fe7f789e886e934aec709
7
- data.tar.gz: fc67495315f925f92ff8e00fe4c8e3babffd1b9c6e608ae274cfa26e72364fa83ea76ea1903b636e979ef9100dd26edd8422a3b64149e6ff726bdc6c0c87a503
6
+ metadata.gz: dae022eecbd54ce73185739df605b3fa5ffd1efc12e411d86bd76f6bfac03f4e20616ac20ffdda04d7c3ef3c3d3d403dac69754a45b5ca9d6fb57daab2444acc
7
+ data.tar.gz: 0f9f04c606150a637744facdc4c9d9bb02ff1918d52b24fd92f5ebb47ec3606aab2e59567355422b485924352cc471f29e18d4be6438378e3ead11e0aeff3c96
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
5
5
 
6
+ ## 0.7.0
7
+
8
+ - [PLAT-670] Add queue_as method
9
+
6
10
  ## 0.6.0
7
11
 
8
12
  - [PLAT-664] Align interface to ActiveJob
@@ -53,6 +53,7 @@ module BackgroundWorker
53
53
  end
54
54
 
55
55
  class << self
56
+ attr_reader :queue
56
57
  def get_state_of(worker_id)
57
58
  BackgroundWorker::PersistentState.get_state_of(worker_id)
58
59
  end
@@ -85,6 +86,10 @@ module BackgroundWorker
85
86
  ensure
86
87
  BackgroundWorker.release_connections! if BackgroundWorker.config.backgrounded
87
88
  end
89
+
90
+ def queue_as(queue = nil)
91
+ @queue = queue&.to_sym || :default
92
+ end
88
93
  end
89
94
  end
90
95
  end
@@ -1,3 +1,3 @@
1
1
  module BackgroundWorker
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.0'
3
3
  end
data/spec/base_spec.rb CHANGED
@@ -36,4 +36,11 @@ describe BackgroundWorker::Base do
36
36
  end
37
37
  expect(cache).to have_received(:store).with(42)
38
38
  end
39
+
40
+ context '#queue_as' do
41
+ it 'should value queue correctly' do
42
+ worker_class.queue_as('low')
43
+ expect(worker_class.queue).to be :low
44
+ end
45
+ end
39
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: background_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-09-02 00:00:00.000000000 Z
13
+ date: 2022-09-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport