mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
15 lines
294 B
Ruby
15 lines
294 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Cache::PreheatingJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform
|
|
User.find_each do |user|
|
|
Rails.cache.write(
|
|
"dawarich/user_#{user.id}_years_tracked",
|
|
user.years_tracked,
|
|
expires_in: 1.day
|
|
)
|
|
end
|
|
end
|
|
end
|