resque-worker-timeout 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/resque/plugins/worker_timeout.rb +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d8247a64d4038cf453e22d35050878a4d024a83
|
|
4
|
+
data.tar.gz: a5fe0d138208faed3798cf83b25211e04d9ac9c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 629d635f0533b22e4541f7be34feb3b2e3fc640b734adff41e9da53e02735eff186f96261af754ffbc5d843c789fec8b1d4bb2c79d985c1bfc0058fb898fcf69
|
|
7
|
+
data.tar.gz: 67075c3c46ee92086d13f3acbb4f6d9f83c6552dccc57c1268eebf43082eef5351e06e0042e2347acf13bac91ef6429c1cb29defad28b2067cc6615f228133bd
|
|
@@ -11,15 +11,15 @@ module Resque
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def around_perform(*args)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
begin
|
|
15
|
+
Timeout::timeout(timeout) do
|
|
16
|
+
yield
|
|
17
|
+
end
|
|
18
|
+
rescue Timeout::Error => e
|
|
19
|
+
if reenqueue_worker
|
|
20
|
+
Resque.enqueue self, *args
|
|
21
|
+
else
|
|
22
|
+
raise e
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resque-worker-timeout
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grant Chen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
A Resque plugin. If you want set worker timeout, extend it with this module.
|