asyncapi-client 0.6.0 → 0.6.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/app/models/asyncapi/client/job.rb +3 -1
- data/app/services/asyncapi/client/update_job.rb +3 -1
- data/app/workers/asyncapi/client/job_post_worker.rb +6 -2
- data/app/workers/asyncapi/client/job_time_out_worker.rb +3 -1
- data/lib/asyncapi/client.rb +1 -0
- data/lib/asyncapi/client/version.rb +1 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0442d58b1fef76db35a72610d36c252e436bd87e
|
4
|
+
data.tar.gz: ae995558fb784a1ae4bb32ec00b3f95282d211a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0a4cdb9e08a98843411f0e02e12a7e5e0246e7d0248ea4234c3dedba85169cbbe84cb5dff1796459a3203b772c78bd4d7787703b187003fb8707ab8fc599296
|
7
|
+
data.tar.gz: 71c2c8dec236313c1794125c4e96137b7533c0bae0f0ca374e820d16b1c38a0a7c427584c30dfebb6b5c4c6c059144501fba0d5315e8c6a0f9341aa7a8770742
|
data/README.md
CHANGED
@@ -70,7 +70,9 @@ module Asyncapi::Client
|
|
70
70
|
}
|
71
71
|
args[:time_out_at] = time_out.from_now if time_out
|
72
72
|
job = create(args)
|
73
|
-
|
73
|
+
ActiveRecord::Base.after_transaction do
|
74
|
+
JobPostWorker.perform_async(job.id, url)
|
75
|
+
end
|
74
76
|
end
|
75
77
|
|
76
78
|
def url
|
@@ -9,7 +9,9 @@ module Asyncapi::Client
|
|
9
9
|
if may_transition?(job, to: status)
|
10
10
|
transition(job, to: status)
|
11
11
|
if job.status_changed? && job.save
|
12
|
-
|
12
|
+
ActiveRecord::Base.after_transaction do
|
13
|
+
JobStatusWorker.perform_async(job.id)
|
14
|
+
end
|
13
15
|
else
|
14
16
|
job.save
|
15
17
|
end
|
@@ -21,12 +21,16 @@ module Asyncapi::Client
|
|
21
21
|
job.assign_attributes(job_params_from(response))
|
22
22
|
job.enqueue
|
23
23
|
if job.save!
|
24
|
-
|
24
|
+
ActiveRecord::Base.after_transaction do
|
25
|
+
JobStatusWorker.perform_async(job.id)
|
26
|
+
end
|
25
27
|
end
|
26
28
|
else
|
27
29
|
job.fail_queue
|
28
30
|
if job.update_attributes!(message: response.body, response_code: response.response_code)
|
29
|
-
|
31
|
+
ActiveRecord::Base.after_transaction do
|
32
|
+
JobStatusWorker.perform_async(job.id)
|
33
|
+
end
|
30
34
|
end
|
31
35
|
end
|
32
36
|
end
|
data/lib/asyncapi/client.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asyncapi-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- G5
|
@@ -10,20 +10,20 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '4.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '4.0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
@@ -110,6 +110,20 @@ dependencies:
|
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '4.0'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: ar_after_transaction
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
type: :runtime
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
113
127
|
- !ruby/object:Gem::Dependency
|
114
128
|
name: sqlite3
|
115
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -280,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
294
|
version: '0'
|
281
295
|
requirements: []
|
282
296
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.
|
297
|
+
rubygems_version: 2.6.4
|
284
298
|
signing_key:
|
285
299
|
specification_version: 4
|
286
300
|
summary: Asynchronous API communication
|