async_block 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/async_block/version.rb +1 -1
- data/lib/async_block.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f4eda1460ecfb9b05ded3656325ee3f8d081376b63f71588d06b06cde53212c
|
4
|
+
data.tar.gz: 015b40f6cc3551c05183d190a2e95530b1a26fd7d6a331bd62b7eab5db7c9000
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c0eb1637ea4dcd557a281b534df1419bbabaeae9606bfccf52539b332f7df91775b29fa5e70812f7251be315b01737f436073cdef4ab521bb118974c9801c88
|
7
|
+
data.tar.gz: cdd31ac2bf9a444fe0481884c3f10a5d755a997dd554f3c16243e2991e484f353f1ce8b1c96ff78d635aba2a9ad637aa2a5784d00533417374cf8d8a5971415c
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Add your code in wrapped inside AsyncBlock as described below.
|
|
18
18
|
\*\* NOTE - AsyncBlock cannot be executed from irb/console
|
19
19
|
|
20
20
|
```
|
21
|
-
AsyncBlock.
|
21
|
+
AsyncBlock.perform do
|
22
22
|
puts('This is running in a temporary job')
|
23
23
|
puts('Put your code below')
|
24
24
|
end
|
data/lib/async_block/version.rb
CHANGED
data/lib/async_block.rb
CHANGED
@@ -10,7 +10,7 @@ require_relative 'async_block/async_wrapper_job'
|
|
10
10
|
module AsyncBlock
|
11
11
|
class Error < StandardError; end
|
12
12
|
|
13
|
-
def self.
|
13
|
+
def self.perform(queue: nil, delay: nil, &block)
|
14
14
|
source = BlockToSource.new(block).convert
|
15
15
|
queue ||= DEFAULT_QUEUE_NAME
|
16
16
|
delay ||= DEFAULT_DELAY
|