mirror of
https://github.com/discourse/discourse.git
synced 2025-03-29 11:35:45 +08:00

Previously the code was very race condition prone leading to odd failures in production It was re-written in raw SQL to avoid conditions where rows conflict on inserts There is no clean way in ActiveRecord to do: Insert, on conflict do nothing and return existing id. This also increases test coverage, we were previously not testing the code responsible for crawling external sites directly