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>2019-11-04 15:06:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-04 15:06:19 +0300
commit38c79b697f45a949701b9961e87b7c9b8de75abf (patch)
treebae163aa8d437f74ea4086b93fb6b3c2e0f9013f /lib/gitlab/daemon.rb
parent2b7a5214342baa2575b35868316ea9413d2afe1f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/daemon.rb')
-rw-r--r--lib/gitlab/daemon.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/daemon.rb b/lib/gitlab/daemon.rb
index 8a253893892..ddb9d907640 100644
--- a/lib/gitlab/daemon.rb
+++ b/lib/gitlab/daemon.rb
@@ -28,6 +28,10 @@ module Gitlab
true
end
+ def thread_name
+ self.class.name.demodulize.underscore
+ end
+
def start
return unless enabled?
@@ -35,7 +39,10 @@ module Gitlab
break thread if thread?
if start_working
- @thread = Thread.new { run_thread }
+ @thread = Thread.new do
+ Thread.current.name = thread_name
+ run_thread
+ end
end
end
end