mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
FIX: Set random values for digest_attempted_at
Setting a random value in the interval 1 week ago ... now works better because this spreads digest scheduling over a week because digests are sent one week from the date of the last digest.
This commit is contained in:
parent
b78ab82284
commit
5efed91128
|
@ -747,7 +747,7 @@ class ImportScripts::Base
|
|||
|
||||
puts "", "Updating user digest_attempted_at..."
|
||||
|
||||
DB.exec("UPDATE user_stats SET digest_attempted_at = now() WHERE digest_attempted_at IS NULL")
|
||||
DB.exec("UPDATE user_stats SET digest_attempted_at = now() - random() * interval '1 week' WHERE digest_attempted_at IS NULL")
|
||||
end
|
||||
|
||||
# scripts that are able to import last_seen_at from the source data should override this method
|
||||
|
|
Loading…
Reference in New Issue
Block a user