background_worker 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/background_worker/base.rb +2 -2
- data/lib/background_worker/config.rb +1 -1
- data/lib/background_worker/version.rb +1 -1
- data/spec/base_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21cc4f8353107acd3a07a1dbb33709a5f5629e266c64ec66eee2a558d61e6614
|
4
|
+
data.tar.gz: 9499f710d1e056be82da09af4c28a8229ac43e6aada29725a1d766f4638fc136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f869b9563b92e17c75632b3de27946ac87939033c068c093e3060b8f062bb26abab31a3559def9fe06a6291016a9c26e764c25a6c96fe7f789e886e934aec709
|
7
|
+
data.tar.gz: fc67495315f925f92ff8e00fe4c8e3babffd1b9c6e608ae274cfa26e72364fa83ea76ea1903b636e979ef9100dd26edd8422a3b64149e6ff726bdc6c0c87a503
|
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.6.0
|
7
|
+
|
8
|
+
- [PLAT-664] Align interface to ActiveJob
|
9
|
+
|
6
10
|
## 0.5.0
|
7
11
|
|
8
12
|
- [PLAT-183] Ruby 3.1, Rails 7.0 and push coverage with github action
|
@@ -58,7 +58,7 @@ module BackgroundWorker
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Public method to do in background...
|
61
|
-
def
|
61
|
+
def perform_later(method_name, options = {})
|
62
62
|
opts = options.symbolize_keys
|
63
63
|
|
64
64
|
method_name = method_name.to_sym
|
@@ -76,7 +76,7 @@ module BackgroundWorker
|
|
76
76
|
# This method is called by the job runner
|
77
77
|
#
|
78
78
|
# It will just call your preferred method in the worker.
|
79
|
-
def
|
79
|
+
def perform_now(method_name, options = {})
|
80
80
|
BackgroundWorker.verify_active_connections! if BackgroundWorker.config.backgrounded
|
81
81
|
|
82
82
|
worker = new(options)
|
data/spec/base_spec.rb
CHANGED
@@ -32,7 +32,7 @@ describe BackgroundWorker::Base do
|
|
32
32
|
|
33
33
|
it 'should perform action and handle transactions/connections appropriately' do
|
34
34
|
Model.transaction do
|
35
|
-
worker_class.
|
35
|
+
worker_class.perform_later(:store_in_cache, value: 42)
|
36
36
|
end
|
37
37
|
expect(cache).to have_received(:store).with(42)
|
38
38
|
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.
|
4
|
+
version: 0.6.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-
|
13
|
+
date: 2022-09-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|