• Yorick Peterse's avatar
    Perform pull request IO work outside a transaction · 71ed7987
    Yorick Peterse authored
    When importing a GitHub pull request we would perform all work in a
    single database transaction. This is less than ideal, because we perform
    various slow Git operations when creating a merge request. This in turn
    can lead to many DB connections being used, while just waiting for an IO
    operation to complete.
    
    To work around this, we now move most of the heavy lifting out of the
    database transaction. Some extra error handling is added to ensure we
    can resume importing a partially imported pull request, instead of just
    throwing an error.
    
    This commit also changes the specs for IssueImporter so they don't rely
    on deprecated RSpec methods.
    71ed7987