BigW Consortium Gitlab

Keep track of import errors

parent bd9e5c5d
......@@ -50,6 +50,7 @@ module Github
fetch_issues
fetch_wiki_repository
expire_repository_cache
track_errors
errors
end
......@@ -369,6 +370,15 @@ module Github
repository.expire_content_cache
end
def track_errors
return unless errors.any?
project.update_column(:import_error, {
message: 'The remote data could not be fully imported.',
errors: errors
}.to_json)
end
def error(type, url, message)
errors << { type: type, url: Gitlab::UrlSanitizer.sanitize(url), error: message }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment