From: elgekko Date: Sat, 14 Oct 2023 18:07:36 +0000 (+0200) Subject: ForkMissingLowres comile X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=6bc0af6020eb8e2e6f7b37ad0e5f4c3f0dd4b566;p=mediacube.git ForkMissingLowres comile --- diff --git a/server/hu.user.mediacube.executors.tests/.settings/org.eclipse.core.resources.prefs b/server/hu.user.mediacube.executors.tests/.settings/org.eclipse.core.resources.prefs index 5140e044..cca95375 100644 --- a/server/hu.user.mediacube.executors.tests/.settings/org.eclipse.core.resources.prefs +++ b/server/hu.user.mediacube.executors.tests/.settings/org.eclipse.core.resources.prefs @@ -5,3 +5,4 @@ encoding//src/hu/user/mediacube/executors/tests/SupportCheckItem.java=UTF-8 encoding//src/hu/user/mediacube/executors/tests/SupportCheckJobStepUsage.java=UTF-8 encoding//src/hu/user/mediacube/executors/tests/SupportCreateItems.java=UTF-8 encoding//src/hu/user/mediacube/executors/tests/SupportSyncMCToTSM.java=UTF-8 +encoding//src/hu/user/mediacube/executors/tests/_2023_OfflineMC2TSMValidator.java=UTF-8 diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/ForkMissingLowresStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/ForkMissingLowresStep.java index 354fa919..db701e94 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/ForkMissingLowresStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/ForkMissingLowresStep.java @@ -29,6 +29,7 @@ public class ForkMissingLowresStep extends JobStep { private static final String CHILD_TEMPLATE_FILTER = "sys-recreate-lowres"; private static final String[] CHILD_TEMPLATES = { "sys-recreate-lowres-71.xml", "sys-recreate-lowres-72.xml", "sys-recreate-lowres-73.xml", "sys-recreate-lowres-74.xml" }; + private static final int MAX_ALLOWED_TRANSCODE = 0; @StepEntry public Object[] execute(String localHiresPath) throws Exception { @@ -93,7 +94,7 @@ public class ForkMissingLowresStep extends JobStep { private List getUntranscodedMedias(DBCollection collection) { List result = new ArrayList<>(); - String query = "SELECT mediaid FROM VW_MISSING_PROXY_IDS"; + String query = String.format("SELECT mediaid FROM VW_MISSING_PROXY_IDS FETCH FIRST %d ROWS ONLY", CHILD_TEMPLATES.length); getManager().executeQuery(query, rs -> { try { long mediaId = rs.getLong(1); @@ -113,8 +114,8 @@ public class ForkMissingLowresStep extends JobStep { return true; result.add(media); - int currentTranscodes = getExecutingTranscodeCount(); - if (currentTranscodes + result.size() == MAX_ALLOWED_TRANSCODE) + int currentTranscodes = getExecutingTranscodeJobs().size(); + if (currentTranscodes + result.size() == CHILD_TEMPLATES.length) return false; } catch (Exception e) { diff --git a/server/user.mediacube.gui/build-gui-module.launch b/server/user.mediacube.gui/build-gui-module.launch index 8ba0ce09..72acb101 100644 --- a/server/user.mediacube.gui/build-gui-module.launch +++ b/server/user.mediacube.gui/build-gui-module.launch @@ -1,20 +1,24 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +