async_block 0.2.5 → 0.2.6

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: a7539642e1592d011a2ee73df80be6fe4302c9305d27fcf4a6b8a3c45e8057a1
4
- data.tar.gz: a983837e94527782bfa72cd385c2c071279f0e66d14f926666f924e40353390c
3
+ metadata.gz: 18e0e1824a1ab945b463420a2e016fdbe18f6d43495ca65709f4a52c74f0e745
4
+ data.tar.gz: b60005b7644181beb5758ad9414439901dfa93ce58b860095a065b59c98eb06b
5
5
  SHA512:
6
- metadata.gz: e79a665d16ea24da30611193955a7e74682a0c653d1833b4dac9d39fe1457db075cd846510206b427a297b75d7fd0ba9b42dbfd33a64417d362bb9c44dc33a92
7
- data.tar.gz: d0ae0f6f9d1ea187f1128fa3a9ffcb0087c54d621b50ed9989119de2f5d53e8999fbca83c2cebb67c17c65b79de259b28221dfd4c6bcbaba55c945e24933a8d5
6
+ metadata.gz: 1ca350e098475197eba58efabd2e995a99e113c9b74504f78756e998cf38b8442af317b77ac9c93e519ce5e98c6a02e6e5dc549c6846ac1b487ffce6cdbd0d51
7
+ data.tar.gz: 62c2ce631bda1ab60f14b1fd832ddda2742730699669061ca8d634b4cec297f7114dd4c5ffc552b37d3f1af925577ab661f68255a10373babaf517b5254979e2
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AsyncBlock
4
- VERSION = '0.2.5'
4
+ VERSION = '0.2.6'
5
5
  end
data/lib/async_block.rb CHANGED
@@ -10,18 +10,13 @@ require_relative 'async_block/async_wrapper_job'
10
10
  module AsyncBlock
11
11
  class Error < StandardError; end
12
12
 
13
- def self.perform(queue: nil, delay: nil, on_error: nil, &block)
13
+ def self.perform(queue: nil, delay: nil, &block)
14
14
  source = BlockToSource.new(block).convert
15
- on_error_source = BlockToSource.new(on_error || default_on_error).convert
16
15
  queue ||= DEFAULT_QUEUE_NAME
17
16
  if delay.instance_of?(ActiveSupport::Duration)
18
- AsyncWrapperJob.set(wait: delay, queue: queue.to_sym).perform_later(source, on_error_source)
17
+ AsyncWrapperJob.set(wait: delay, queue: queue.to_sym).perform_later(source)
19
18
  else
20
- AsyncWrapperJob.set(queue: queue.to_sym).perform_later(source, on_error_source)
19
+ AsyncWrapperJob.set(queue: queue.to_sym).perform_later(source)
21
20
  end
22
21
  end
23
-
24
- def self.default_on_error(error_message)
25
- puts('AsyncBlockError', error_message)
26
- end
27
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async_block
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adittya Dey