python

Multi-core twisted with systemd socket activation

2 minute read Published: 2017-04-26

With a stateless Twisted app you can scale by adding more instances. Unless you are explicitly offloading to subprocesses you will often have spare cores on the same box as your existing instance. But to exploit them you end up running haproxy or faking a load balancer with iptables. Are there any other options?

Finding when a file was added to Git and when it was last changed

1 minute read Published: 2016-07-26

I recently built a visualisation of all Django migrations in a project and the dependencies between them. I was most interested in recent migrations, and in particular if a migration had been changed after it had been deployed. So adding the tag a migration was introduced in (and the tag it was last modified in) seemed like a good idea.