rhoconnect 4.0.3 → 4.0.4

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzEyZTRlNDkzNWNjZTBiNTlkNTFhNWQ0YzgwZDAwY2RmODQzZjg3NA==
4
+ MDBhM2NiYzg5N2I5NzRmNjg1ODk3ZjM4MDI5ZmFmN2IyOTJiOWZjNQ==
5
5
  data.tar.gz: !binary |-
6
- YmNhNjQyNDZmZDNiY2M0MTViMzI1N2FlZTBmOGQ0NjYzOWQ5NjExYQ==
6
+ YTRlNDA1ZmIzZDQ3OTZkMWQ5MmQyOTlmNDdhYjM0NThhNDgzY2U1NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzFlOWMyZGM5N2M5Y2M0ZDhhZmJjNGE3NmExN2E0NzIwOGNhZGIwOGIxZjU5
10
- ZjFjZjE1YTJhMjQ5NDFkODlmMDljZjI1NGFjMThmMzA0MWQyZGE0ZmNkNmMz
11
- YjA5Y2EyMTliZjRhZjE0ZjIxYmJkOGRkMjk3NzI0N2VhOTNiNjQ=
9
+ ZDhkMjVlMjI0NDk3N2I4YzY5M2ExMzA0MmNjMzNkZTU0NGIyMmU2YzVkYWM3
10
+ YjdlZDIwMmFiZjM2OTU4MDc0ZjIzNGExYjdkN2MxMmE1ZDhhMDY4OTYwOTAx
11
+ OWExZGZkY2NkM2QwODFmYTgxYWY5NGUyMWU4NzZiMjIzY2U5N2U=
12
12
  data.tar.gz: !binary |-
13
- OTJlYTUzMDRlZDM3YzAzZmQzZTkzMzdiODllZWE0MTJjNjZjMjk2NGU2M2Uw
14
- MTY1NGY1NDQyODA0NWVhZTFhNjM0NDk4ZWM2ZDEwNzE2YjhiMjNiNTkzNDFh
15
- ODhiNmI0MzU0NGYyMGE1NGM4MmIzOWZiZTYxMmQxMDIxZjgxNWM=
13
+ ZWVkODNmMTVlYTc2ODhjM2JmN2JkNzVkY2ZjMDAyMzdjZjg3OTE2M2Q2OTk2
14
+ NzY3OTZjODQ2Njk3N2QxY2Y5OWJlMDMxODczYjRlYWJhYTU4NDgyMDU0NTEz
15
+ MzM2NDFhNjdhY2Y0NWVjZmNmNjdjNDA0ZDAwNDcyOTliZWM2ZjY=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 4.0.4 (2014-03-26)
2
+ * 68317450 - 'query' SourceJob infinite loop
3
+
1
4
  ## 4.0.3 (2014-03-07)
2
5
  * Fixing redis connection string for windows (backport from master)
3
6
  * #66902274: CUD operations alter user between login-cud-logoff sequence
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rhoconnect (4.0.3)
4
+ rhoconnect (4.0.4)
5
5
  bundler (~> 1.0)
6
6
  connection_pool (~> 1.0.0)
7
7
  json (~> 1.7.7)
@@ -18,7 +18,7 @@ PATH
18
18
  GEM
19
19
  remote: https://rubygems.org/
20
20
  specs:
21
- addressable (2.3.5)
21
+ addressable (2.3.6)
22
22
  arr-pm (0.0.9)
23
23
  cabin (> 0)
24
24
  async-rack (0.5.1)
@@ -30,7 +30,7 @@ GEM
30
30
  backports (3.6.0)
31
31
  builder (3.2.2)
32
32
  cabin (0.6.1)
33
- childprocess (0.5.1)
33
+ childprocess (0.5.2)
34
34
  ffi (~> 1.0, >= 1.0.11)
35
35
  clamp (0.6.3)
36
36
  coffee-script (2.2.0)
@@ -90,9 +90,9 @@ GEM
90
90
  rainbow
91
91
  sprockets (~> 2)
92
92
  json (1.7.7)
93
- mime-types (2.1)
93
+ mime-types (2.2)
94
94
  mono_logger (1.1.0)
95
- multi_json (1.9.0)
95
+ multi_json (1.9.2)
96
96
  net-scp (1.1.2)
97
97
  net-ssh (>= 2.6.5)
98
98
  net-ssh (2.8.0)
@@ -143,7 +143,7 @@ GEM
143
143
  rack (~> 1.4)
144
144
  rack-protection (~> 1.4)
145
145
  tilt (~> 1.3, >= 1.3.4)
146
- sprockets (2.11.0)
146
+ sprockets (2.12.0)
147
147
  hike (~> 1.2)
148
148
  multi_json (~> 1.0)
149
149
  rack (~> 1.0)
@@ -34,7 +34,7 @@ module Rhoconnect
34
34
  if s
35
35
  rh = lambda { @model.query(params[:query])}
36
36
  model = Rhoconnect::Model::Base.create(s)
37
- Rhoconnect::Handler::Query::Engine.new(model, rh, {}).do_sync
37
+ Rhoconnect::Handler::Query::Engine.new(model, rh, {}).run_query
38
38
  s.clone(:md, s.docname(:md_copy)) unless s.sync_type.to_sym == :bulk_sync_only
39
39
  end
40
40
  end
@@ -26,22 +26,28 @@ module Rhoconnect
26
26
  if source.query_queue or source.queue
27
27
  query_res = async(:query, source.query_queue || source.queue, params[:query])
28
28
  else
29
- source.if_need_refresh do
30
- Rhoconnect::Stats::Record.update("source:query:#{source.name}") do
31
- if auth_method('login')
32
- query_res = run_query
33
- auth_method('logoff')
34
- end
35
- # re-wind refresh time in case of error
36
- query_failure = source.exists?(:errors)
37
- source.rewind_refresh_time(query_failure)
29
+ query_res = run_query
30
+ end
31
+ query_res
32
+ end
33
+
34
+ def run_query
35
+ query_res = nil
36
+ source.if_need_refresh do
37
+ Rhoconnect::Stats::Record.update("source:query:#{source.name}") do
38
+ if auth_method('login')
39
+ query_res = _execute_query
40
+ auth_method('logoff')
38
41
  end
42
+ # re-wind refresh time in case of error
43
+ query_failure = source.exists?(:errors)
44
+ source.rewind_refresh_time(query_failure)
39
45
  end
40
46
  end
41
47
  query_res
42
48
  end
43
49
 
44
- def run_query
50
+ def _execute_query
45
51
  errordoc = nil
46
52
  docobj = nil
47
53
  result = nil
@@ -13,7 +13,7 @@ module Rhoconnect
13
13
  handler_sync = lambda { @model.query(params[:query])}
14
14
  @model = Rhoconnect::Model::Base.create(source)
15
15
  source_sync = Rhoconnect::Handler::Query::Engine.new(@model, handler_sync, params)
16
- source_sync.do_sync
16
+ source_sync.run_query
17
17
  when :cud
18
18
  handler_cud = lambda { @model.send params[:operation].to_sym, params["#{params[:operation]}_object".to_sym] }
19
19
  @model = Rhoconnect::Model::Base.create(source)
@@ -1,3 +1,3 @@
1
1
  module Rhoconnect
2
- VERSION = '4.0.3'
2
+ VERSION = '4.0.4'
3
3
  end
@@ -4,6 +4,8 @@ describe "SourceJob" do
4
4
  it_behaves_like "SharedRhoconnectHelper", :rhoconnect_data => true do
5
5
  before(:each) do
6
6
  @s = Source.load(@s_fields[:name],@s_params)
7
+ @s.query_queue = 'query'
8
+ @s.cud_queue = 'cud'
7
9
  end
8
10
 
9
11
  it "should perform process_query" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhoconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rhomobile
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler