update cloud mode off for order and queue

This commit is contained in:
Aung Myo
2018-04-20 09:23:11 +06:30
parent 830dc1b4d2
commit f8687b5010
2 changed files with 14 additions and 12 deletions

View File

@@ -342,6 +342,7 @@ class Order < ApplicationRecord
#Process order items and send to order queue #Process order items and send to order queue
def self.pay_process_order_queue(id,table_id) def self.pay_process_order_queue(id,table_id)
if ENV["SERVER_MODE"] != 'cloud'
sidekiq = Lookup.find_by_lookup_type("sidekiq") sidekiq = Lookup.find_by_lookup_type("sidekiq")
if !sidekiq.nil? if !sidekiq.nil?
OrderQueueProcessorJob.perform_later(id, table_id) OrderQueueProcessorJob.perform_later(id, table_id)
@@ -355,6 +356,7 @@ class Order < ApplicationRecord
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
end end
end end
end
def check_cup_status(status) def check_cup_status(status)
if status.include? "Active: active (running)" || "Active: active (exited)" #"Cup Server is already running" if status.include? "Active: active (running)" || "Active: active (exited)" #"Cup Server is already running"