Created
October 20, 2015 12:14
-
-
Save DmitriyBaklikov/59eae8aeebe8e0e8ceb0 to your computer and use it in GitHub Desktop.
Wombat orders pushing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :wombat do | |
desc 'push to wombat' | |
task wombat_orders: :environment do | |
puts "\n" | |
puts "Starting pushing objects to Wombat at #{Time.now.in_time_zone}" | |
Spree::Wombat::Config[:push_objects].each do |object| | |
# Spree::Wombat::Client.push_batches(object) | |
objects_pushed_count = Spree::Wombat::Client.push_batches(object) | |
puts "Pushed #{objects_pushed_count} #{object} to Wombat - Done #{Time.now.in_time_zone}" | |
end | |
puts "Rake task finished at #{Time.now.in_time_zone} \n\n" | |
puts "-----------------------------------------------" | |
puts "\n" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment