-
- Private work.
- Read MS IRA quarterly report.
- Flask does have backward comp issues (werkzeug, flask, extensions, more). Most of these have been in the world of ext, not webframework primitives, so I’ve lifted those deps. Eg flask-user to cognito, for this guy’s problem: https://blog.miguelgrinberg.com/post/we-have-to-talk-about-flask.
- Disabled adblockplus on yt. Just ublockorigin (and privacybadger, but trackers diff than ads).
- Matt Levine, on PE funds: “Really though the ideal would be to raise money from public investors without running a public fund. One classic way to do this is with insurance: You buy or start an insurance company, the insurance company sells life insurance and annuities to public investors, and it invests the float in your private equity business. The public investors aren’t investors in a fund; they are customers of an insurance company. (The insurance company, meanwhile, is a large institutional investor, so its investments are private.) This is a very popular approach and many of the big private equity firms have insurance businesses.” You could also become a holding company / conglomerate. Your portfolio doesn’t contain shares in a bunch of companies, it owns a bunch of companies.
- Updated geforce drivers.
- Supercontest.
- Moved schedules from
apscheduler
to eventbridge
.
- https://gitlab.com/bmahlstedt/supercontest/-/issues/190
- They call lambdas. The functions use
urllib3
from the stdlib (rather than requests
) so no deps.
- The app logic for the schedules stays in the app, but is now triggered from a rest call.
- Set the schedules in eventbridge with no retry policy, to start.
- Schedules don’t run in dev (so don’t need email conditional logic, etc). They just run from eventbridge -> lambda and hit the endpoints in the prod app.
- Now that jobs run within a request context, I can use
url_for
and url_root
to dynamically infer addresses/links (rather than hardcoding).
- If an exception is uncaught within a route, flask (obviously) returns 500. Rewrote some of the schedule targets to return clear bools of whether or not the action was done (eg “don’t need to commit scores rn”), so that the routes can forward the appropriate status code.
- Overall change was -150 lines.
- Did some manual auth management with a custom route decorator. Will switch to better auth during the cognito migration (and api gateway).
- Cleaned some of the “I actually did this action” function bool passarounds. Plugged into http status code responses for clarity.
- The metrics for these schedules are not on the eventbridge side, they’re on the target side (lambda). Cloudwatch handles all this, obviously, but you don’t have to create a custom dashboard (unless you want) – just go to the lambda function and check the monitor tab.
- Will add alarms for failure later. Easy on “failure” clarifications. Would love to plot by status code response. I didn’t have this for apscheduler jobs before either. Now it’s easier to plug in. A good benefit of moving everything atomic to the cloud.
- Confirmed score commits worked, for both this change and yesterday’s (all the cloudfront changes).
- And the
url_for
changes for dynamic linking.
- Both eventbridge and lambda have retry policies. I had disabled the eventbridge one, and still noticed a larger-than-expected number of lambda invocations. It was because of the retry setting on the faas side, retrying twice in the event of failure.