remove console.log on undefined lastCron (still gotta figure out what

to do with them)
This commit is contained in:
Tyler Renelle
2013-01-28 14:44:14 -05:00
parent b4e8d1e69a
commit c4f0ec7ce0
+2 -4
View File
@@ -24,11 +24,9 @@ module.exports.deleteStaleAccounts = () ->
throw err if err
return unless user?
lastCron = new Date(user.lastCron)
unless isValidDate(lastCron)
console.log user.lastCron
return
return unless isValidDate(lastCron) # still gotta figure out what to do with users with "undefined" lastCron
diff = Math.abs(moment(today).sod().diff(moment(lastCron).sod(), "days"))
if diff > 30
if diff > 15
collection.remove {_id: user._id}, (err, res) -> throw err if err
collection.count registered, (err, result) -> console.log("#{result} registered users [after]")