Skip to content
Browse files
[FIXED JENKINS-25473] move config file check as part of loading job t…
…o do it in multithread fashion than in a single thread

(cherry picked from commit dc547cf)
  • Loading branch information
N Nachiappan authored and olivergondza committed Dec 21, 2014
1 parent 4629122 commit cca17cc4f6106304c954a0bf3942ad0d7be4c7e6
Showing with 5 additions and 5 deletions.
  1. +5 −5 core/src/main/java/jenkins/model/
@@ -2603,11 +2603,7 @@ private synchronized TaskBuilder loadTasks() throws IOException {
throw new IOException(projectsDir+" is not a directory");
throw new IOException("Unable to create "+projectsDir+"\nPermission issue? Please create this directory manually.");
File[] subdirs = projectsDir.listFiles(new FileFilter() {
public boolean accept(File child) {
return child.isDirectory() && Items.getConfigFile(child).exists();
File[] subdirs = projectsDir.listFiles();

final Set<String> loadedNames = Collections.synchronizedSet(new HashSet<String>());

@@ -2653,6 +2649,10 @@ public void run(Reactor session) throws Exception {
for (final File subdir : subdirs) {
g.requires(loadHudson).attains(JOB_LOADED).notFatal().add("Loading job "+subdir.getName(),new Executable() {
public void run(Reactor session) throws Exception {
if(!Items.getConfigFile(subdir).exists()) {
//Does not have job config file, so it is not a jenkins job hence skip it
TopLevelItem item = (TopLevelItem) Items.load(Jenkins.this, subdir);
items.put(item.getName(), item);

0 comments on commit cca17cc

Please sign in to comment.