mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
16 lines
381 B
Ruby
16 lines
381 B
Ruby
class UserSlackStatusUpdateJob < ApplicationJob
|
|
queue_as :latency_10s
|
|
|
|
BATCH_SIZE = 25
|
|
|
|
def perform
|
|
User.where(uses_slack_status: true).find_each(batch_size: BATCH_SIZE) do |user|
|
|
begin
|
|
user.update_slack_status
|
|
rescue => e
|
|
Rails.logger.error "Failed to update Slack status for user #{user.slack_uid}: #{e.message}"
|
|
end
|
|
end
|
|
end
|
|
end
|