kennel 1.50.1 → 1.51.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc88113c58755de472140ee4c734b028f04d7222c4433192a71d8ba441f38d49
4
- data.tar.gz: 547412eb62bae5a5dc7d601a74ed7f1fd29c1e12078fe32abfb5bcf1e0a64e26
3
+ metadata.gz: cf65db42c0f1dbd43a7f2a6d0910a018565db65e431cea3c39b88d796b1ccce0
4
+ data.tar.gz: 1d0db8fca3e1f1b9d4085ae1e783b2b6f28a0ae3682ba9b2b743612b1b71b5dc
5
5
  SHA512:
6
- metadata.gz: 0020656d117c83d078a1ae585ac124fea8fa2970872dca59f1c94922dba7ec5c4d4543d425fe65b91ec53a401193a9cb9baa24d949e4dca667d59381a254ad48
7
- data.tar.gz: 0312710345b73441b95283c37572033c79c43c5db194e69de1caed44403e20d345e5c541355f206f425acdd5f061581a04520614e29527f88f6f64f5a8942955
6
+ metadata.gz: a774657cac63f4080d9767453ccf5e9c301aaaf2cae15486e26f87e54c851dc9246421cb6aa16f585a7311748dc6031ed6a65124c1cf01d19669ca1604ff78ab
7
+ data.tar.gz: a922269b47847376d1287e42a06aed1fe4fdbab3c0a8f550f9983fe1d2823314c186e3f809dbb2ea607446d67fd6f168d28e113dd8f0d33428ead5979deae804
data/lib/kennel/syncer.rb CHANGED
@@ -72,11 +72,22 @@ module Kennel
72
72
  filter_by_project! actual
73
73
 
74
74
  details_cache do |cache|
75
- actual.each do |a|
76
- id = a.fetch(:id)
75
+ items = actual.map do |a|
77
76
  e = matching_expected(a)
78
77
  if e && @expected.delete(e)
79
- fill_details(a, cache) if e.class::API_LIST_INCOMPLETE
78
+ [e, a]
79
+ else
80
+ [nil, a]
81
+ end
82
+ end
83
+
84
+ # fill details of things we need to compare (only do this part in parallel for safety & balancing)
85
+ Utils.parallel(items.select { |e, _| e && e.class::API_LIST_INCOMPLETE }) { |_, a| fill_details(a, cache) }
86
+
87
+ # pick out things to update or delete
88
+ items.each do |e, a|
89
+ id = a.fetch(:id)
90
+ if e
80
91
  diff = e.diff(a)
81
92
  @update << [id, e, a, diff] if diff.any?
82
93
  elsif tracking_id(a) # was previously managed
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.50.1"
3
+ VERSION = "1.51.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.50.1
4
+ version: 1.51.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser