I think this is a race condition: two separate huey processes might try to diff the same attempt, causing a violation of the uniqueness constraint.
I think that re-fetching every element before diffing it would be slow, so maybe this error should just be caught and the task should ignore that attempt.
I think this is a race condition: two separate huey processes might try to diff the same attempt, causing a violation of the uniqueness constraint.
I think that re-fetching every element before diffing it would be slow, so maybe this error should just be caught and the task should ignore that attempt.