# setts all products to check or not their quantity
class ProductsQuantityCheckChangeJob < ApplicationJob
  queue_as :default

  def perform(val)
    products = Product.all
    products.each do |p|
      p.chk_quantity = val
      p.save
    end
    # TODO; send notify by action cable
  end
end
