mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:19:52 +01:00
55f60bc5a7
handled by Zeitwerk now
22 lines
442 B
Ruby
22 lines
442 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ExportWorker
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options queue: :export, retry: 0
|
|
|
|
# @param user_id [Integer] the user id
|
|
def perform(user_id)
|
|
user = User.find(user_id)
|
|
|
|
exporter = Exporter.new(user)
|
|
exporter.export
|
|
|
|
Notification::DataExported.create(
|
|
target_id: user.id,
|
|
target_type: "User::DataExport",
|
|
recipient: user,
|
|
new: true
|
|
)
|
|
end
|
|
end
|