This actually avoids the transaction completely. Previously,
the behavior was:
* BEGIN
* GithubCacheEntry.create
* SELECT to check for existing object
* INSERT
* Upload blob
* GithubCacheEntry#update (UPDATE)
* COMMIT
Now behavior is:
* SELECT to check for existing object
* Upload blob
* GithubCacheEntry.create
* SELECT to check for existing object
* INSERT
I don't think the sleeping inside transaction is related to the H12
errors, but when increasing the Puma threads beyond the database
connection pool size, you definitely want to avoid sleeping inside
transactions.
Best reviewed without whitespace differences.