Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Warn users about invalid FAS email / bugzilla account mapping #169
Currently admins are getting an email every 10 minutes informing them about invalid mappings. Then, we email the users so that they can act on it.
With this change, users will be automatically notified.
Sometime, it takes a really long time for users to react, recently we have seen more than a week. So while we do not want to spam users as much as we do for admins (every 10 minutes), we still want to pressure them into fixing it by sending them a hourly reminder.
The error's arguments are a tuple of information whose last item is the human readable description of the error. So instead of storing the tuple, store its human readable description
This change retrieves from the error message the email of the user affected. It then sends an email to that user about the situation and the steps that can be taken to resolve it. The email is then stored in a JSON object on disc, together with the current date (UTC) as unix timestamp. For every run, the script will check the date of the last update (ie last time we notified the user about the issue) and if the delta is more than 3600 seconds (60*60 = 1 hour), a new email will be sent. So users will receive a hourly reminder to change their synchronize their bugzilla/FAS emails/account while admins will keep getting the information every 10 minutes (as currently).
No the cron will keep running every 10 minutes, so Kevin and I will still be spammed (at least for now), but users will only the notification once per hour.