From: Sweidan Omar Date: Fri, 10 Dec 2021 10:16:35 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=fc3e678f5dc9a3243328e7c3d0f2d5ba0d76c1aa;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32543 --- diff --git a/server/user.jobengine.osgi.server/src/user/jobengine/server/JobEngineConfiguration.java b/server/user.jobengine.osgi.server/src/user/jobengine/server/JobEngineConfiguration.java index dc591b01..af0aa582 100644 --- a/server/user.jobengine.osgi.server/src/user/jobengine/server/JobEngineConfiguration.java +++ b/server/user.jobengine.osgi.server/src/user/jobengine/server/JobEngineConfiguration.java @@ -74,9 +74,9 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { Set libFiles = getJavaFileList(Paths.get(stepsDir), null); libFiles.addAll(sharedFiles); - // for (File f : libFiles) { - // logger.info("GroovyClassLoader source {}", f.getAbsolutePath()); - // } + // for (File f : libFiles) { + // logger.info("GroovyClassLoader source {}", f.getAbsolutePath()); + // } GroovyClassLoader gcl = new GroovyClassLoader(stepsClassLoader) { @@ -84,8 +84,8 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { protected CompilationUnit createCompilationUnit(CompilerConfiguration config, CodeSource source) { CompilationUnit result = new CompilationUnit(config, source, this); libFiles.forEach(f -> result.addSource(f)); - //loadStepSources(result, Paths.get(stepsDir, "shared")); - //loadStepSources(result, Paths.get(stepsDir)); + // loadStepSources(result, Paths.get(stepsDir, "shared")); + // loadStepSources(result, Paths.get(stepsDir)); return result; } @@ -151,7 +151,7 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { URL[] urls = { path.toUri().toURL() }; stepsClassLoader = URLClassLoader.newInstance(urls, Thread.currentThread().getContextClassLoader()); } catch (FileNotFoundException e) { - //nincs jobs/classes mappa + // nincs jobs/classes mappa URL[] urls = {}; stepsClassLoader = URLClassLoader.newInstance(urls, Thread.currentThread().getContextClassLoader()); } @@ -253,9 +253,10 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { Path path = Paths.get(stepsDir, className); File classFile = null; - //Windows alatt az eleresi utak irasmodja egyforma kell legyen. - //A GroovyClassLoader - //ld. createGroovyClassLoader a new File(path.toFile().getCanonicalPath())-al operal. + // Windows alatt az eleresi utak irasmodja egyforma kell legyen. + // A GroovyClassLoader + // ld. createGroovyClassLoader a new File(path.toFile().getCanonicalPath())-al + // operal. classFile = new File(path.toFile().getCanonicalPath()); logger.info("Class path is normalized to {}", classFile.getCanonicalPath()); @@ -285,11 +286,11 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { if (!executors.containsKey(unitName)) { logger.info("Executor now registered for {}", unitName); executors.put(unitName, executor); - //az uj vegrehajtokat el is kell inditani + // az uj vegrehajtokat el is kell inditani if (autoStart) executor.startup(); } else { - //logger.info("Executor already registered for {}", unitName); + // logger.info("Executor already registered for {}", unitName); IJobStepExecutor stepExecutor = executors.get(unitName); int currentMaxConcurrent = stepExecutor.getMaxConcurrent(); int newMaxConcurrent = executor.getMaxConcurrent(); @@ -316,7 +317,7 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { @Override public void loadSchedules() throws Exception { - //a kulcs nem lehet a template, mert kulonbozo parameterekkel is benne lehet! + // a kulcs nem lehet a template, mert kulonbozo parameterekkel is benne lehet! schedules.clear(); String configFilePath = systemConfig.getConfig(JobEngineConfiguration.CONF_SCHEDULES); logger.info("Loading scheduler configuration file {}", configFilePath); @@ -353,8 +354,9 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { try { if (add) { - //ha a betoltendo osztaly eleresi utja korabban mas kapitalissal kerul feldolgozasra, hibat kapunk - //ld. loadClassFromSourceCode + // ha a betoltendo osztaly eleresi utja korabban mas kapitalissal kerul + // feldolgozasra, hibat kapunk + // ld. loadClassFromSourceCode File classFile = new File(p.toFile().getCanonicalPath()); result.add(classFile); } @@ -373,9 +375,9 @@ public class JobEngineConfiguration implements IJobEngineConfiguration { private void loadTemplate(Path config) { InputStream stream = null; try { - // byte[] xmlBytes = Files.readAllBytes(config); - // String xml = new String(xmlBytes); - // stream = new ByteArrayInputStream(xmlBytes); + // byte[] xmlBytes = Files.readAllBytes(config); + // String xml = new String(xmlBytes); + // stream = new ByteArrayInputStream(xmlBytes); stream = Files.newInputStream(config); String fileName = config.getFileName().toString(); Parser parser = new Parser(stream);