apidae 0.9.29 → 0.9.30

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: c06e12208141f3a0f283b82a3438fb4752da15b5
4
- data.tar.gz: b6c2ea92ed4519b4a5c1bda82df22f9056cf99c7
3
+ metadata.gz: c1c1fb7c634489e8f0b818456d5357350c831c1a
4
+ data.tar.gz: ef128efee4eb71d21bd241fcbf58c8cc3555a8fc
5
5
  SHA512:
6
- metadata.gz: cb17dd528999b0b71f958f9696f660021a8f8145cd2f882bad6509c2149926202238315faa3ad6de5cae516dfe84082f1d40c8a62492f6e91c9d514b51d0e089
7
- data.tar.gz: d0acfd4457d895fe313e071931aea478ae393a91f2920388231627e4155de56cf96b618b52ff227bd390868537134428e0dca9b77ee6318e701d70c2941fcb31
6
+ metadata.gz: c2a584d62f6d3be2770fbe506796ce4a83bb4086a638f1a360f4d130cef1172a63785581b2597fe73e62bc5c38496d7ac680482ae4ab7c7d2f622f22a5c78eab
7
+ data.tar.gz: 2b4321408b8e345be6d350e9e0846da3af41b5a6b3202ae27e19d55db2d4432e9578006c1634650c0bb238ba91278f017dc28da28ff5ca3948c0915253a49be4
@@ -65,7 +65,7 @@ module Apidae
65
65
  key = cache_key(:agenda, from, to)
66
66
  res = $apidae_cache.read(key)
67
67
  unless res
68
- query_args = build_args(AGENDA_ENDPOINT, {selection_ids: [apidae_id], from: from, to: to})
68
+ query_args = build_args(AGENDA_ENDPOINT, {selection_ids: [apidae_id], from: from, to: to, count: 200})
69
69
  res = query_api(query_args, true)
70
70
  $apidae_cache.write(key, res)
71
71
  end
@@ -135,14 +135,15 @@ module Apidae
135
135
 
136
136
  if all_results
137
137
  loops = 0
138
+ max_loops = only_ids ? 50 : MAX_LOOPS
138
139
  query_args[:first] = 0
139
- query_args[:count] = MAX_COUNT
140
+ query_args[:count] ||= MAX_COUNT
140
141
  query_args[:locales] ||= apidae_project && !apidae_project.locales.blank? ? apidae_project.locales : [DEFAULT_LOCALE]
141
142
  response = JSON.parse get_response(query_args), symbolize_names: false
142
143
  total = response['numFound']
143
144
  query_result[:results] = (only_ids ? response['objetTouristiqueIds'] : response['objetsTouristiques']) || {}
144
145
 
145
- while total > results_count(query_result) && loops < MAX_LOOPS
146
+ while total > results_count(query_result) && loops < max_loops
146
147
  loops += 1
147
148
  query_args[:first] += MAX_COUNT
148
149
  response = JSON.parse get_response(query_args), symbolize_names: false
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "0.9.29"
2
+ VERSION = "0.9.30"
3
3
  end
@@ -65,3 +65,5 @@ Migrating to AddLocalesDataToApidaeProjects (20190123214635)
65
65
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
66
66
  Apidae::Obj Load (26.8ms) SELECT apidae_id, COUNT(id) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL GROUP BY "apidae_objs"."apidae_id" HAVING (COUNT(id) > 1)
67
67
  Apidae::Obj Load (2.4ms) SELECT apidae_id, COUNT(id) FROM "apidae_objs" WHERE "apidae_objs"."root_obj_id" IS NULL GROUP BY "apidae_objs"."apidae_id" HAVING (COUNT(id) > 1)
68
+ Apidae::Obj Load (0.8ms) SELECT "apidae_objs".* FROM "apidae_objs" ORDER BY "apidae_objs"."id" ASC LIMIT $1 [["LIMIT", 1]]
69
+  (3.4ms) SELECT COUNT(*) FROM "apidae_objs"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apidae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.29
4
+ version: 0.9.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-24 00:00:00.000000000 Z
11
+ date: 2021-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails