@@ 51,11 51,13 @@ Rails.application.config.after_initialize do
ShopifyApp::WebhooksManager.add_registrations
- Shop.all.each do |shop|
- next unless shop.whiplash_api_key
+ if Rake.application.top_level_tasks.empty?
+ Shop.all.each do |shop|
+ next unless shop.whiplash_api_key
- SyncAssignedOrdersJob.perform_later(shop, true)
- SyncWhiplashOrderStatusJob.perform_later(shop, true)
+ SyncAssignedOrdersJob.perform_later(shop, true)
+ SyncWhiplashOrderStatusJob.perform_later(shop, true)
+ end
end
end
end