Skip to content

Instantly share code, notes, and snippets.

@jasonheecs
Last active March 22, 2019 03:25
Show Gist options
  • Save jasonheecs/c454fbd88fcc10eae09d6f6f20708bd3 to your computer and use it in GitHub Desktop.
Save jasonheecs/c454fbd88fcc10eae09d6f6f20708bd3 to your computer and use it in GitHub Desktop.
test
c = Channel.find 142568
$shopify_session = c.create_shopify_session
ShopifyAPI::Base.activate_session($shopify_session)
include Integrations::Shopify::Paginator
shopify_collection(:product)
sp = _
spids = sp.map(&:id)
spids = spids - c.owners(:product).map(&:online_id).map(&:to_i).uniq
spids.each do |id|
Shopify::ImportProductFromShopifyJob.new.perform c.id, id
sleep 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment