<div dir="ltr"><div>Hi all,<br><br></div><div>I've written most of the new weather's backend a.k.a the notification scripts that run hourly(LowBandwidth, Nodedown) and daily(Welcome, Tshirt) as cron jobs and this is how they essentially operate:<br>
</div><div>1. Fetch and parse required documents from Onionoo.<br></div><div>2. Filter out required relays(e.g 'running', 'stable' flagged for welcome email).<br></div><div>3. For each filtered relay:<br></div>
<div>  3.a. For each notification type:<br>      3.a.a. Query the corresponding subscription model to get subscribers' info.<br></div><div>      3.a.b. Collect the email(to, from, subject, content) to be sent.<br></div>
<div>4. Send out the collected mass email.<br></div><div>5. Delete old entries and/or update the django models.<br></div><div><br></div><div>I happened to make some changes the onionoo-wrapper module in this process by modifying the response objects, utilities etc. The current version with all the changes is available at <a href="https://github.com/lucyd/tor-weather/tree/backend">https://github.com/lucyd/tor-weather/tree/backend</a>. After fixing a couple of issues, I setup the vagrant+puppet environment that was previously configured(#11417). I tested out the notification scripts and although the daily script is working fine, the hourly script is giving a couple of errors for now. I plan on fixing these pretty soon and testing the overall weather to make sure everything's working fine.<br>
</div><div><br></div>Cheers,<br>Sreenatha<br></div>