Hey all, I'm trying to print out the variable values inside of batch blocks for debug purpose, but somehow it doesn't work. Nothing print out. I wonder if anyone knows how to do that? Thanks a lot.
BatchLoader.for(object).batch do |meals, loader|
billables = InternalClient::MakomoClient.billables_by_consumption_owners(
owners: meals,
internal_name: MENU_PRICE_NAME
).group_by { |b| b.owner_id.to_i }
puts billables
meals.each do |meal|
menu_price = billables[meal.id].result.first.amount
loader.call(meal, menu_price)
end
end