mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
11 lines
322 B
Ruby
11 lines
322 B
Ruby
# frozen_string_literal: true
|
|
|
|
class VisitSuggestingJob < ApplicationJob
|
|
queue_as :visit_suggesting
|
|
|
|
def perform(user_ids: [], start_at: 1.day.ago, end_at: Time.current)
|
|
users = user_ids.any? ? User.where(id: user_ids) : User.all
|
|
|
|
users.find_each { Visits::Suggest.new(_1, start_at:, end_at:).call }
|
|
end
|
|
end
|