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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 851e96fbed1359db54547088ea0be4bb7a6c145169b61b82b42ab7e4a2825498
4
- data.tar.gz: 608ed8a043ff96f7104262ad5d38691b8c27ce947060708a960fa85280351d6d
3
+ metadata.gz: 21cc4f8353107acd3a07a1dbb33709a5f5629e266c64ec66eee2a558d61e6614
4
+ data.tar.gz: 9499f710d1e056be82da09af4c28a8229ac43e6aada29725a1d766f4638fc136
5
5
  SHA512:
6
- metadata.gz: e3c702150edadf96f131e54a8f95477a28fd79ded9387d4df29e59cb8a5101f334bb7945440b7fe56f149ab661f0d847d7c0b4d488d182930c4781aa51f36831
7
- data.tar.gz: 44212955d5f1410e42b69a7344f8eb8079e0cacf184b6ed5030ce03a5da2c21cfc4f2a158fba0e8cd5110fb39b67df487b6ac1db386e437b4ca1231dcd4c91e6
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 perform_in_background(method_name, options = {})
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 perform(method_name, options = {})
79
+ def perform_now(method_name, options = {})
80
80
  BackgroundWorker.verify_active_connections! if BackgroundWorker.config.backgrounded
81
81
 
82
82
  worker = new(options)
@@ -28,7 +28,7 @@ module BackgroundWorker
28
28
  end
29
29
 
30
30
  def foreground_enqueue(klass, method_name, opts)
31
- klass.perform(method_name, opts)
31
+ klass.perform_now(method_name, opts)
32
32
  end
33
33
 
34
34
  def default_after_exception(e)
@@ -1,3 +1,3 @@
1
1
  module BackgroundWorker
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
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.perform_in_background(:store_in_cache, value: 42)
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.5.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-01-25 00:00:00.000000000 Z
13
+ date: 2022-09-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport