Still getting the error: Job exception: UserDestroyer::PostsExistError


(Pad Pors) #1

Continuing the discussion from Job exception: UserDestroyer::PostsExistError:

the same error exists (it’s never gone after 2-3 recent updates):

Job exception: UserDestroyer::PostsExistError

/var/www/discourse/app/services/user_destroyer.rb:18:in `destroy'
/var/www/discourse/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb:21:in `block (2 levels) in execute_onceoff'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/discourse/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb:17:in `block in execute_onceoff'
/var/www/discourse/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb:11:in `each_key'
/var/www/discourse/app/jobs/onceoff/fix_primary_emails_for_staged_users.rb:11:in `execute_onceoff'
/var/www/discourse/app/jobs/onceoff.rb:21:in `execute'
/var/www/discourse/app/jobs/base.rb:153:in `block (2 levels) in perform'

(Jeff Atwood) #2

Is this your one off job @tgxworld?


(Alan Tan) #3

@Pad_Pors Can you try running the following queries in rails console and see if it returns more than one user record?

User.where(active: false, staged: true).joins(:email_tokens).group("email_tokens.email").having("COUNT(email_tokens.email) > 1").count.keys

Don’t submit the output here as the email will be revealed.


(Pad Pors) #4

It gave me 4 emails, i.e. 4 users.