Move `UnlinkForkService` processing to a Sidekiq job

Problem

This service's execute method does a few expensive things like:

  • Iterating on existing MRs and closing them
  • Updating records (iterating though fork_source.lfs_objects)

It means the more MRs we have to close, and more LFS objects we have to relate, more time will be spent here.

Proposals

  • Move the call that's done upon project visibility level decrease (!20466 (merged)) to Sidekiq
  • Move the call that's done at remove_fork to Sidekiq
Edited Nov 22, 2019 by Oswaldo Ferreira
Assignee Loading
Time tracking Loading