Reduced transactional email sends a bit.
This commit is contained in:
parent
2e43b18857
commit
a4964ea36e
2 changed files with 10 additions and 8 deletions
server
|
@ -542,7 +542,8 @@ handleLadderUpdate = (req, res) ->
|
||||||
res.send('Great work, Captain Cron! I can take it from here.')
|
res.send('Great work, Captain Cron! I can take it from here.')
|
||||||
res.end()
|
res.end()
|
||||||
# TODO: somehow fetch the histograms
|
# TODO: somehow fetch the histograms
|
||||||
emailDays = [1, 2, 4, 7, 14, 30]
|
#emailDays = [1, 2, 4, 7, 14, 30]
|
||||||
|
emailDays = [1, 3, 7] # Reduced to keep smaller monthly recipient footprint
|
||||||
now = new Date()
|
now = new Date()
|
||||||
for daysAgo in emailDays
|
for daysAgo in emailDays
|
||||||
# Get every session that was submitted in a 5-minute window after the time.
|
# Get every session that was submitted in a 5-minute window after the time.
|
||||||
|
|
|
@ -209,6 +209,7 @@ UserSchema.methods.register = (done) ->
|
||||||
@set 'name', uniqueName
|
@set 'name', uniqueName
|
||||||
done()
|
done()
|
||||||
else done()
|
else done()
|
||||||
|
if @isEmailSubscriptionEnabled 'generalNews'
|
||||||
data =
|
data =
|
||||||
email_id: sendwithus.templates.welcome_email
|
email_id: sendwithus.templates.welcome_email
|
||||||
recipient:
|
recipient:
|
||||||
|
|
Reference in a new issue