mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Turn off hackatime activity logs (#566)
This commit is contained in:
@@ -280,7 +280,8 @@ class Api::Hackatime::V1::HackatimeController < ApplicationController
|
||||
def queue_heartbeat_public_activity(user_id, project_name)
|
||||
# only queue the job once per minute
|
||||
Rails.cache.fetch("heartbeat_public_activity_#{user_id}_#{project_name}", expires_in: 30.seconds) do
|
||||
CreateHeartbeatActivityJob.perform_later(user_id, project_name)
|
||||
# temporarily disable
|
||||
# CreateHeartbeatActivityJob.perform_later(user_id, project_name)
|
||||
end
|
||||
rescue => e
|
||||
# never raise an error here because it will break the heartbeat flow
|
||||
|
||||
@@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def set_public_activity
|
||||
return unless Flipper.enabled?(:public_activity_log, current_user)
|
||||
@activities = PublicActivity::Activity.all
|
||||
@activities = PublicActivity::Activity.limit(25).order(created_at: :desc).includes(:owner, :trackable)
|
||||
end
|
||||
|
||||
def honeybadger_context
|
||||
|
||||
Reference in New Issue
Block a user