mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
14 lines
320 B
Ruby
14 lines
320 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
class PlaceVisitsCalculatingJob < ApplicationJob
|
||
|
|
queue_as :visit_suggesting
|
||
|
|
sidekiq_options retry: false
|
||
|
|
|
||
|
|
def perform(user_id)
|
||
|
|
user = User.find(user_id)
|
||
|
|
places = user.places # Only user-owned places (with user_id)
|
||
|
|
|
||
|
|
Places::Visits::Create.new(user, places).call
|
||
|
|
end
|
||
|
|
end
|