Duplicate digests still

(Brian Cheek) #1

Continuing the discussion from After rebuild: lost email association + digest spam every 6 hours:

disabled digests for all users after 14 got duplicates the last several days. Found threads (including this one) that the bug had been fixed, upgraded to the latest commit this morning…enabled digests and this afternoon those same 14 users got another digest!

Did I miss something?

(Régis Hanol) #2

Maybe the jobs were stuck in sidekiq?

What do you see in the sent email logs?

(Brian Cheek) #3

User profiles show correct time for e-mails. Nothing seems to stand out for these 14, a few are test a few internal employees, the rest customers…created different times, different viewing habits, different vistis, etc.

1 Like
(Régis Hanol) #4

Seems like everything is back to normal. Digests should get back to their schedule.

(Brian Cheek) #5

What are you basing that on?

(Régis Hanol) #6

The bug was that whenever we sent a digest (every 6 hours), we were not updating the “last_emailed_at” column. You could see that in the sent emails logs because there were lines not associated to a user (ie. username was empty). I fixed the code so that it properly updates the “last_emailed_at” column and added a migration to fix these old records. You just need to wait for the next run of the Digest job to get everything back to normal.

Does that make sense?

1 Like
(Brian Cheek) #7

Yes, that helps thank you.

I don’t recall ever seeing any blank lines in the log though…maybe I just don’t remember.

Also, I didn’t check individual accounts before I upgraded (or before the digest went this last time) so I am hoping you are correct since those accounts do have a "last_emailed_at" that is correct now, that it is fixed.

(Jeff Atwood) closed #8