jobly 0.5.0 → 0.5.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19a36c80fdd58187000786fce4d687ff9175acc2d9f7119d5d150ac272d740a2
|
4
|
+
data.tar.gz: 448fdc28e33e936ac5740951d8a149d2b4871f658817739a0061511518600498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8957cc8eb8b24b6d4d7d792090a512a86a2650f66a02488a2d393b3dc4905d6390c79a994e0ce596b00da86b04fcb5c3a8ce97764f1ab9adf83c602beb486d7c
|
7
|
+
data.tar.gz: 287083a87ad49bdc38ea0959240e60cd7afc054b8a49a0d77bdb9aa48e35eb6e7e4e1218fc232164dbeb62d4720672a0c803a5b628de4dafd6ccec706e5396b6
|
@@ -6,10 +6,12 @@ module Jobly
|
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
-
attr_reader :isolate
|
10
|
-
|
11
9
|
def isolated(enabled = true)
|
12
|
-
@
|
10
|
+
@isolation_enabled = enabled
|
11
|
+
end
|
12
|
+
|
13
|
+
def isolated?
|
14
|
+
!!@isolation_enabled
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
@@ -20,7 +22,7 @@ module Jobly
|
|
20
22
|
end
|
21
23
|
|
22
24
|
def isolated?
|
23
|
-
self.class.
|
25
|
+
self.class.isolated?
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -13,10 +13,19 @@ module Jobly
|
|
13
13
|
attr_reader :solo_key
|
14
14
|
|
15
15
|
def solo(expire: 1.hour, key: nil)
|
16
|
-
@
|
16
|
+
@solo_enabled = true
|
17
|
+
@solo_key = key
|
17
18
|
before { solo_locked? ? skip_job : solo_lock(expire) }
|
18
19
|
after { solo_unlock }
|
19
20
|
end
|
21
|
+
|
22
|
+
def solo?
|
23
|
+
!!@solo_enabled
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def solo?
|
28
|
+
self.class.solo?
|
20
29
|
end
|
21
30
|
|
22
31
|
def solo_key
|
data/lib/jobly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jobly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|