bricolage-streamingload 0.5.0 → 0.5.1
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 +4 -4
- data/lib/bricolage/streamingload/objectbuffer.rb +18 -12
- data/lib/bricolage/streamingload/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6fcd9200426dc3c2389566e0b6c5618d7ee2ae2f
|
|
4
|
+
data.tar.gz: 6880ed950da15b2550c706bb0525364286889e23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e278f2dbf3e9cc26b3c1420bea5a4e580af7eaf006b01e2bfecd641efa553214583b3291160d80911c9b7ed06ee00164eb76a64b13a4ef7ab586dcfaae790de7
|
|
7
|
+
data.tar.gz: ea493c3e3f2ee8644c3615dc1667fe2902120c8af5c86bfe71b882020aa967801c70b12eff69c0032f6ee486781fcde475a7c0e18e9d73bdb84ec2a32c62c535
|
|
@@ -274,16 +274,27 @@ module Bricolage
|
|
|
274
274
|
, obj.object_id
|
|
275
275
|
, load_batch_size
|
|
276
276
|
from
|
|
277
|
+
-- unassigned objects
|
|
277
278
|
(
|
|
278
279
|
select
|
|
279
280
|
data_source_id
|
|
280
|
-
, object_url
|
|
281
|
-
,
|
|
281
|
+
, uniq_objects.object_url
|
|
282
|
+
, object_id
|
|
282
283
|
from
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
(
|
|
285
|
+
select
|
|
286
|
+
min(object_id) as object_id
|
|
287
|
+
, object_url
|
|
288
|
+
from
|
|
289
|
+
strload_objects
|
|
290
|
+
group by
|
|
291
|
+
object_url
|
|
292
|
+
) uniq_objects
|
|
293
|
+
inner join strload_objects using(object_id)
|
|
294
|
+
left outer join strload_task_objects using(object_id)
|
|
295
|
+
where
|
|
296
|
+
task_id is null
|
|
297
|
+
) obj
|
|
287
298
|
|
|
288
299
|
-- tasks without objects
|
|
289
300
|
inner join (
|
|
@@ -297,16 +308,11 @@ module Bricolage
|
|
|
297
308
|
using (schema_name, table_name)
|
|
298
309
|
where
|
|
299
310
|
-- unassigned objects
|
|
300
|
-
task_id not in (select task_id from strload_task_objects)
|
|
311
|
+
task_id not in (select distinct task_id from strload_task_objects)
|
|
301
312
|
group by
|
|
302
313
|
1
|
|
303
314
|
) task
|
|
304
315
|
using (data_source_id)
|
|
305
|
-
|
|
306
|
-
left outer join strload_task_objects task_obj
|
|
307
|
-
using (object_id)
|
|
308
|
-
where
|
|
309
|
-
task_obj.object_id is null -- unassigned to a task
|
|
310
316
|
) as t
|
|
311
317
|
where
|
|
312
318
|
object_count <= load_batch_size -- limit number of objects assigned to single task
|