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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8274e7016099107a618108ef2d8d2cfd5736e94a
4
- data.tar.gz: fdf839d81d5f3fea0416cf4bcc6e0239caabd9bf
3
+ metadata.gz: 9ef9015fc636d63b9da425016c8b34ec75749695
4
+ data.tar.gz: d71f571ba10e29a5ba4bc5540a4fb8ca64112b8e
5
5
  SHA512:
6
- metadata.gz: f8d30cdce910cfe8f7910363c0d6d44289cf54c32bbce53e042937b5d7ef1ce09ee0e6096b39848e847d78643b87435d4b53dd8ad9820234aa936194db828ee0
7
- data.tar.gz: 815165f82d7fad4fb4bd35b1db91be6040787f3583e325f935285ba3bb3994a477edb9b67dbd4d6cdf8d3ae8b4bcdeb2ee69be27c3d903fb9f10e59e3fa4b000
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
- complete!
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 complete!
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)
@@ -1,3 +1,3 @@
1
1
  module Asyncable
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asyncable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Francis