emp
This commit is contained in:
@@ -41,7 +41,7 @@ class Employee < ApplicationRecord
|
|||||||
if (session_token)
|
if (session_token)
|
||||||
user = Employee.find_by_token_session(session_token)
|
user = Employee.find_by_token_session(session_token)
|
||||||
expiry_time = login_expiry_time
|
expiry_time = login_expiry_time
|
||||||
|
if !user.session_expiry.nil?
|
||||||
if user && user.session_expiry.utc > DateTime.now.utc
|
if user && user.session_expiry.utc > DateTime.now.utc
|
||||||
#Extend the login time each time authenticatation take place
|
#Extend the login time each time authenticatation take place
|
||||||
user.session_expiry = user.session_expiry.utc + expiry_time.minutes
|
user.session_expiry = user.session_expiry.utc + expiry_time.minutes
|
||||||
@@ -51,6 +51,7 @@ class Employee < ApplicationRecord
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
application_path="#{File.expand_path("../..", __FILE__)}"
|
# application_path="#{File.expand_path("../..", __FILE__)}"
|
||||||
directory application_path
|
# directory application_path
|
||||||
#environment ENV.fetch("RAILS_ENV") { "production" }
|
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
||||||
environment "production"
|
# environment "production"
|
||||||
pidfile "#{application_path}/tmp/puma/pid"
|
# pidfile "#{application_path}/tmp/puma/pid"
|
||||||
state_path "#{application_path}/tmp/puma/state"
|
# state_path "#{application_path}/tmp/puma/state"
|
||||||
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
port ENV.fetch("PORT") { 62158 }
|
# port ENV.fetch("PORT") { 62158 }
|
||||||
workers 2
|
# workers 2
|
||||||
preload_app!
|
# preload_app!
|
||||||
threads 1,1
|
# threads 1,1
|
||||||
|
|||||||
Reference in New Issue
Block a user