recurring loading working now

This commit is contained in:
2025-06-22 11:04:32 +02:00
parent 5eaad428ff
commit 98b28bcd4f
9 changed files with 70 additions and 84 deletions

View File

@@ -0,0 +1,13 @@
class LoadAllActivitiesJob < ApplicationJob
def perform
User.all.each do |user|
begin
next if user.logins.alive.empty?
LoadUserActivitiesJob.perform_later(user)
logger.info("Loading for #{user.id} scheduled")
rescue StandardError => e
Rails.logger.error("Loading for #{user.id} failed: #{e.class} - #{e.message}")
end
end
end
end