check quantity job added

This commit is contained in:
Adrian Hinz 2018-04-22 01:41:17 +02:00
parent d71a45d198
commit e424f08825
2 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,12 @@
class ProductsQuantityCheckChangeJob < ApplicationJob
queue_as :default
def perform(*args)
# Do something later
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

View File

@ -4,4 +4,5 @@ class ProductsQuantityCheckChangeJobTest < ActiveJob::TestCase
# test "the truth" do
# assert true
# end
end