Revision.state causes one SQL query on each access
This can cause duplicate queries like in #488 (closed). The queries will get worse with each git push
as WorkerVersions get added. We can turn it into a cached_property
to protect it during the execution of the request, and might be able to use optimizations similar to those of the Ponos workflow to just require a prefetch_related('versions')
on a revision.