check quantity job added
This commit is contained in:
parent
d71a45d198
commit
e424f08825
|
|
@ -2,7 +2,12 @@
|
||||||
class ProductsQuantityCheckChangeJob < ApplicationJob
|
class ProductsQuantityCheckChangeJob < ApplicationJob
|
||||||
queue_as :default
|
queue_as :default
|
||||||
|
|
||||||
def perform(*args)
|
def perform(val)
|
||||||
# Do something later
|
products = Product.all
|
||||||
|
products.each do |p|
|
||||||
|
p.chk_quantity = val
|
||||||
|
p.save
|
||||||
|
end
|
||||||
|
# TODO; send notify by action cable
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,5 @@ class ProductsQuantityCheckChangeJobTest < ActiveJob::TestCase
|
||||||
# test "the truth" do
|
# test "the truth" do
|
||||||
# assert true
|
# assert true
|
||||||
# end
|
# end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue