check quantity job added
This commit is contained in:
parent
d71a45d198
commit
e424f08825
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ class ProductsQuantityCheckChangeJobTest < ActiveJob::TestCase
|
|||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue