mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
11 lines
262 B
Ruby
11 lines
262 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
|