app/models/disco_app/concerns/synchronises.rb in disco_app-0.18.2 vs app/models/disco_app/concerns/synchronises.rb in disco_app-0.18.3
- old
+ new
@@ -45,14 +45,10 @@
where(shop: shop, id: data[:id]).destroy_all
end
def synchronise_all(shop, params = {})
- resource_count = shop.with_api_context { self::SHOPIFY_API_CLASS.count(params) }
-
- (1..(resource_count / SYNCHRONISES_PAGE_LIMIT.to_f).ceil).each do |page|
- DiscoApp::SynchroniseResourcesJob.perform_later(shop, name, params.merge(page: page, limit: SYNCHRONISES_PAGE_LIMIT))
- end
+ DiscoApp::SynchroniseResourcesJob.perform_later(shop, name, params)
end
end
included do
# Override the "read" data attribute to allow indifferent access.