0e831b0b69
Since external diffs are likely to be a bit slower than in-database ones, add a mode that makes diffs external after they've been obsoleted by events. This should strike a balance between performance and disk space. A background cron drives the majority of migrations, since diffs become outdated through user actions.
12 lines
292 B
Ruby
12 lines
292 B
Ruby
# frozen_string_literal: false
|
|
|
|
class MigrateExternalDiffsWorker
|
|
include ApplicationWorker
|
|
|
|
def perform(merge_request_diff_id)
|
|
diff = MergeRequestDiff.find_by_id(merge_request_diff_id)
|
|
return unless diff
|
|
|
|
MergeRequests::MigrateExternalDiffsService.new(diff).execute
|
|
end
|
|
end
|