change channel to cronဓ
This commit is contained in:
@@ -2,7 +2,7 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
include LoginVerification
|
include LoginVerification
|
||||||
layout "origami"
|
layout "origami"
|
||||||
|
|
||||||
before_action :checkin_process
|
# before_action :checkin_process
|
||||||
|
|
||||||
#before_action :check_installation
|
#before_action :check_installation
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
@@ -15,7 +15,7 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
|
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
|
||||||
end
|
end
|
||||||
|
|
||||||
def checkin_process
|
# def checkin_process
|
||||||
CheckinJob.set(wait: 1.minute).perform_later()
|
# CheckinJob.set(wait: 1.minute).perform_later()
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class CheckinJob < ApplicationJob
|
class CheckinJob < ApplicationJob
|
||||||
queue_as :default
|
queue_as :default
|
||||||
|
|
||||||
def perform()
|
def self.perform()
|
||||||
table = DiningFacility.get_checkin_booking
|
table = DiningFacility.get_checkin_booking
|
||||||
if table.length > 0
|
if table.length > 0
|
||||||
ActionCable.server.broadcast "checkin_channel",table: table
|
ActionCable.server.broadcast "checkin_channel",table: table
|
||||||
|
|||||||
@@ -10,3 +10,6 @@ every 30.minutes do
|
|||||||
runner "Customer.update_membership"
|
runner "Customer.update_membership"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
every 1.minutes do
|
||||||
|
runner "CheckinJob.perform"
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user