mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
to improve diagnosability, set the thread name to indicate what it's polling.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15209 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
04951d8e60
commit
8eb167ba43
1 file changed
+4
@@ -417,6 +417,8 @@ public class SCMTrigger extends Trigger<SCMedItem> {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Thread.currentThread().setName("SCM polling for "+job);
|
||||
try {
|
||||
while(pollingScheduled) {
|
||||
getLock().lockInterruptibly();
|
||||
@@ -447,6 +449,8 @@ public class SCMTrigger extends Trigger<SCMedItem> {
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
LOGGER.info("Aborted");
|
||||
} finally {
|
||||
Thread.currentThread().setName(threadName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user