From: Sweidan Omar Date: Mon, 6 Dec 2021 11:40:32 +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=e54f686110e6b08f9cb5e6b9ba80a51bb123fb99;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32468 --- diff --git a/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java b/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java index 764472f2..db06c75f 100644 --- a/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java +++ b/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java @@ -25,7 +25,7 @@ public class JobStepExecutor implements IJobStepExecutor { @Override public void run() { - //setName(String.format("%s step executor thread", stepClass.getSimpleName())); + // setName(String.format("%s step executor thread", stepClass.getSimpleName())); try { barrier.countDown(); } catch (Exception e) { @@ -40,10 +40,10 @@ public class JobStepExecutor implements IJobStepExecutor { logger.info("JobEngine is null"); if (jobEngine.isWorker() && isRemote) { - //a worker is csak azokat akarja vegrehajtani + // a worker is csak azokat akarja vegrehajtani ClusteredJob job = jobEngine.getRemoteEngine().getRemoteJob(getStepUnitName()); - //TODO remote-ba jelezni, hogy nem sikerult + // TODO remote-ba jelezni, hogy nem sikerult if (shutdown) { logger.trace("{} skipping by shutdown", jobRuntime); jobEngine.sendMessage(new JobStepSkippedMessage(jobRuntime.getId())); @@ -51,8 +51,8 @@ public class JobStepExecutor implements IJobStepExecutor { } if (job != null) { - //TODO set job accepted = PROCESSING_REMOTLY + if error then feedback? - //jobRuntime.setDescription(PROCESSING_REMOTLY); + // TODO set job accepted = PROCESSING_REMOTLY + if error then feedback? + // jobRuntime.setDescription(PROCESSING_REMOTLY); jobRuntime = new ClusteredJobRuntime(job, jobEngine, e -> { IJobRuntime runtime = (IJobRuntime) e.getSource(); job.setStatus(runtime.getStatus()); @@ -74,7 +74,7 @@ public class JobStepExecutor implements IJobStepExecutor { } if (jobRuntime != null) { - //ha remote, de nem jelentkezik senki, akkor helyi vegrehajtas + // ha remote, de nem jelentkezik senki, akkor helyi vegrehajtas if (isRemote) { long submitted = jobRuntime.getSubmitted().getTime(); long current = System.currentTimeMillis(); @@ -82,15 +82,15 @@ public class JobStepExecutor implements IJobStepExecutor { if (timeout) { logger.info("Remote JobStep timed out, processing locally."); } else { - // if (!WAIT_REMOTE_PROCESSOR.equals(jobRuntime.getDescription())) - // jobRuntime.setDescription(WAIT_REMOTE_PROCESSOR); + // if (!WAIT_REMOTE_PROCESSOR.equals(jobRuntime.getDescription())) + // jobRuntime.setDescription(WAIT_REMOTE_PROCESSOR); queue.put(jobRuntime); continue; } } logger.info("Executing locally {}", jobRuntime.getId()); - //jobRuntime.setDescription(PROCESSING_LOCALLY); + // jobRuntime.setDescription(PROCESSING_LOCALLY); Object[] inputs = jobEngine.getInputsFromStack(jobRuntime); IJobStep stepObject = runStep(jobRuntime, inputs); @@ -145,24 +145,22 @@ public class JobStepExecutor implements IJobStepExecutor { } finally { /* - //kozos loader hasznalata! - if (step != null) { - ClassLoader cl = step.getClass().getClassLoader(); - if (cl instanceof GroovyClassLoader) { - - GroovyClassLoader stepClassLoader = (GroovyClassLoader) cl; - stepClassLoader.close(); - } - } - */ + * //kozos loader hasznalata! if (step != null) { ClassLoader cl = + * step.getClass().getClassLoader(); if (cl instanceof GroovyClassLoader) { + * + * GroovyClassLoader stepClassLoader = (GroovyClassLoader) cl; + * stepClassLoader.close(); } } + */ } - //TODO itt lekezelni a remote notification-t + // TODO itt lekezelni a remote notification-t - //TODO ha ez van, akkor a WAITING_CANCEL allpotban marad, ha nincs, akkor meg neha visszakerul a run queue-ba - // if (!jobRuntime.isWaitingCancel()) { - // jobEngine.sendMessage(new JobStepCompletedMessage(jobRuntime.getId(), outputs)); - // } + // TODO ha ez van, akkor a WAITING_CANCEL allpotban marad, ha nincs, akkor meg + // neha visszakerul a run queue-ba + // if (!jobRuntime.isWaitingCancel()) { + // jobEngine.sendMessage(new JobStepCompletedMessage(jobRuntime.getId(), + // outputs)); + // } jobEngine.sendMessage(new JobStepCompletedMessage(jobRuntime.getId(), outputs)); return step; }