Skip to content

Commit

Permalink
Fix atleisure skip_property usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kkolotyuk committed Sep 20, 2016
1 parent 3c7c2fc commit 6461862
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/workers/suppliers/atleisure/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def fetch_data_and_process(properties)
if result.success?
properties_data = result.value
properties_data.map do |property|
property_id = property['HouseCode']
if validator(property).valid?
synchronisation.start(property['HouseCode']) {
synchronisation.start(property_id) {
# AtLeisure's API calls return with large result payloads while
# synchronising properties, therefore, event tracking is disabled
# while the property is parsed.
Expand All @@ -49,7 +50,7 @@ def fetch_data_and_process(properties)
mapper.prepare(property)
}
else
synchronisation.skip_property
synchronisation.skip_property(property_id, 'Invalid property')
end
end
else
Expand Down

0 comments on commit 6461862

Please sign in to comment.