Update exporter for carrierwave & profile fields

This commit is contained in:
Karina Kwiatek 2021-12-22 00:25:32 +01:00
parent 08bafb1d78
commit 8302f1b396
2 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,7 @@ require 'exporter'
class ExportWorker
include Sidekiq::Worker
sidekiq_options queue: :export, retry: false
sidekiq_options queue: :export, retry: 0
# @param user_id [Integer] the user id
def perform(user_id)

View File

@ -35,19 +35,18 @@ class Exporter
def collect_user_info
%i(answered_count asked_count ban_reason banned_until comment_smiled_count commented_count
confirmation_sent_at confirmed_at created_at crop_h crop_h_h crop_h_w crop_h_x crop_h_y
crop_w crop_x crop_y current_sign_in_at current_sign_in_ip display_name follower_count friend_count
confirmation_sent_at confirmed_at created_at profile_header profile_header_h profile_header_w profile_header_x profile_header_y
profile_picture_w profile_picture_h profile_picture_x profile_picture_y current_sign_in_at current_sign_in_ip display_name follower_count friend_count
id last_sign_in_at last_sign_in_ip locale permanently_banned
privacy_allow_anonymous_questions privacy_allow_public_timeline privacy_allow_stranger_answers
privacy_show_in_search profile_header_content_type profile_header_file_name profile_header_file_size
profile_header_updated_at profile_picture_content_type profile_picture_file_name profile_picture_file_size
profile_picture_updated_at screen_name show_foreign_themes sign_in_count smiled_count updated_at).each do |f|
privacy_show_in_search profile_header_file_name profile_picture_file_name
screen_name show_foreign_themes sign_in_count smiled_count updated_at).each do |f|
@obj[f] = @user.send f
end
@obj[:profile] = {}
%i(display_name motivation_header website location description).each do |f|
@obj[:profile][f] = @user.send f
@obj[:profile][f] = @user.profile.send f
end
EXPORT_ROLES.each do |role|
@ -240,7 +239,7 @@ class Exporter
uobj[:profile] = {}
%i(display_name motivation_header website location description).each do |f|
uobj[:profile][f] = user.send f
uobj[:profile][f] = user.profile.send f
end
EXPORT_ROLES.each do |role|