asyncable 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asyncable.rb +7 -3
- data/lib/asyncable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ef9015fc636d63b9da425016c8b34ec75749695
|
4
|
+
data.tar.gz: d71f571ba10e29a5ba4bc5540a4fb8ca64112b8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9e65dac21243a3da1f44a22bff6ea6cd15a40cfccca5c5fe0fb58e8b5e66709478e4ab7e11bd7f41895538e7728f63c1416a2f352bcad0edf4cae76bcb8f36d
|
7
|
+
data.tar.gz: b16e5506bc3ec527c14caeeabd736ec3f9ce07ee48d3d657ee2b5dbaf2096d6407b800f907b4f58fa7b93ef62254a993325fc4a71562a1a0aa5a96ab7b7435a6
|
data/lib/asyncable.rb
CHANGED
@@ -36,7 +36,7 @@ module Asyncable
|
|
36
36
|
def process_in_background
|
37
37
|
begin
|
38
38
|
async_operation
|
39
|
-
|
39
|
+
async_complete!
|
40
40
|
rescue Exception => e
|
41
41
|
failed!(e)
|
42
42
|
end
|
@@ -44,10 +44,14 @@ module Asyncable
|
|
44
44
|
handle_asynchronously :process_in_background
|
45
45
|
|
46
46
|
|
47
|
-
def
|
47
|
+
def async_complete!
|
48
|
+
success!
|
49
|
+
after_async_complete
|
50
|
+
end
|
51
|
+
|
52
|
+
def success!
|
48
53
|
self.status = Statuses::SUCCEEDED
|
49
54
|
save
|
50
|
-
after_async_complete
|
51
55
|
end
|
52
56
|
|
53
57
|
def failed!(error)
|
data/lib/asyncable/version.rb
CHANGED