mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FEATURE: add a simple queue Scheduler::Defer.later {}
For quick jobs that do not need to be sent to sidekiq, runs inline in a single thread but does not block
This commit is contained in:
@ -33,9 +33,12 @@ class Auth::DefaultCurrentUserProvider
|
||||
|
||||
if current_user
|
||||
|
||||
Jobs.enqueue(:update_user_info,
|
||||
user_id: current_user.id,
|
||||
ip: request.ip)
|
||||
u = current_user
|
||||
Scheduler::Defer.later do
|
||||
u.update_last_seen!
|
||||
u.update_ip_address!(request.ip)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# possible we have an api call, impersonate
|
||||
|
Reference in New Issue
Block a user