worker resource cache: don't retry on foreign key
this doesn't actually do anything to create its dependents, so if we hit
a foreign key error, that's not recoverable
@@ -58,10 +58,6 @@ func (workerResourceCache WorkerResourceCache) FindOrCreate(tx Tx) (*UsedWorkerR
QueryRow().
Scan(&id)
if err != nil {
- if pqErr, ok := err.(*pq.Error); ok && pqErr.Code.Name() == "foreign_key_violation" {
- return nil, ErrSafeRetryFindOrCreate
- }
-
if pqErr, ok := err.(*pq.Error); ok && pqErr.Code.Name() == "unique_violation" {
return nil, ErrSafeRetryFindOrCreate
}
