Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-16 00:10:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-16 00:10:04 +0300
commitec3e75cfeadc943e3fc63ac5e6b5504ad43ea512 (patch)
tree79bc910fc137d5c46d6670a98e74a0438486f0bf /lib/gitlab/diff
parent36b47b4bd3eb88b08323cb26f5863e1dacdb18b7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/rendered/notebook/diff_file.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/gitlab/diff/rendered/notebook/diff_file.rb b/lib/gitlab/diff/rendered/notebook/diff_file.rb
index 0795e0acebb..0a5b2ec3890 100644
--- a/lib/gitlab/diff/rendered/notebook/diff_file.rb
+++ b/lib/gitlab/diff/rendered/notebook/diff_file.rb
@@ -8,7 +8,6 @@ module Gitlab
include Gitlab::Utils::StrongMemoize
RENDERED_TIMEOUT_BACKGROUND = 10.seconds
- RENDERED_TIMEOUT_FOREGROUND = 1.5.seconds
BACKGROUND_EXECUTION = 'background'
FOREGROUND_EXECUTION = 'foreground'
LOG_IPYNBDIFF_GENERATED = 'IPYNB_DIFF_GENERATED'
@@ -70,7 +69,7 @@ module Gitlab
next
end
- Timeout.timeout(timeout_time) do
+ Gitlab::RenderTimeout.timeout(background: RENDERED_TIMEOUT_BACKGROUND) do
IpynbDiff.diff(source_diff.old_blob&.data, source_diff.new_blob&.data,
raise_if_invalid_nb: true,
diffy_opts: { include_diff_info: true })&.tap do
@@ -104,10 +103,6 @@ module Gitlab
)
end
- def timeout_time
- Gitlab::Runtime.sidekiq? ? RENDERED_TIMEOUT_BACKGROUND : RENDERED_TIMEOUT_FOREGROUND
- end
-
def log_event(message, error = nil)
Gitlab::AppLogger.info({ message: message })
Gitlab::ErrorTracking.log_exception(error) if error