limits musicians in weekly email
this limits the number of users in weekly email to be 20
This commit is contained in:
parent
7149392fe2
commit
9b94ea6351
|
|
@ -2,6 +2,7 @@ module JamRuby
|
|||
class EmailNewMusicianMatch
|
||||
|
||||
PER_PAGE = 150
|
||||
LIMIT = 20
|
||||
JOINED_WITHIN_DAYS = 7
|
||||
ACTIVE_WITHIN_DAYS = 30
|
||||
|
||||
|
|
@ -39,7 +40,7 @@ module JamRuby
|
|||
true, true, 7.days.ago, 6.days.ago).where.not(id: email_sending.sent_user_ids).order("
|
||||
CASE WHEN users.email IN ('#{PRIORITY_RECIPIENTS.map {|str| "\"#{str}\""}.join(',')}')
|
||||
THEN 0 ELSE 1 END, last_active_at DESC").select("users.*,
|
||||
GREATEST(updated_at, last_jam_updated_at) AS last_active_at").limit(20)
|
||||
GREATEST(updated_at, last_jam_updated_at) AS last_active_at").limit(LIMIT)
|
||||
|
||||
AdminMailer.ugly({to: APP_CONFIG.user_match_monitoring_email,
|
||||
subject:"Weekly user match email sending job started.",
|
||||
|
|
|
|||
Loading…
Reference in New Issue