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 +4 -4
- data/app/models/apidae/selection.rb +4 -3
- data/lib/apidae/version.rb +1 -1
- data/test/dummy/log/development.log +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c1fb7c634489e8f0b818456d5357350c831c1a
|
4
|
+
data.tar.gz: ef128efee4eb71d21bd241fcbf58c8cc3555a8fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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]
|
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 <
|
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
|
data/lib/apidae/version.rb
CHANGED
@@ -65,3 +65,5 @@ Migrating to AddLocalesDataToApidaeProjects (20190123214635)
|
|
65
65
|
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
66
66
|
[1m[36mApidae::Obj Load (26.8ms)[0m [1m[34mSELECT 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)[0m
|
67
67
|
[1m[36mApidae::Obj Load (2.4ms)[0m [1m[34mSELECT 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)[0m
|
68
|
+
[1m[36mApidae::Obj Load (0.8ms)[0m [1m[34mSELECT "apidae_objs".* FROM "apidae_objs" ORDER BY "apidae_objs"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
69
|
+
[1m[35m (3.4ms)[0m [1m[34mSELECT COUNT(*) FROM "apidae_objs"[0m
|
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.
|
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:
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|