From a4c8334dc2ce6ba6d6147d691afaa331adcad452 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Wed, 6 Dec 2017 21:55:54 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30793 --- client/Maestro/Sources/NexioRESTSource.cs | 4 ++-- server/-configuration/run-mediacube-server.launch | 2 +- server/-product/mediacube.product | 4 ++++ .../config/scheduledjobs.json | 12 +----------- .../commons/nexio/NexioClipEventDispatcher.java | 15 ++++++++------- .../src/user/commons/nexio/NexioDataMiner.java | 4 ++-- .../src/user/commons/octopus/IOctopusAPI.java | 2 +- .../user/commons/octopus/OctopusDataMiner.java | 2 +- server/user.jobengine.osgi.server/pages/index.zul | 2 +- 9 files changed, 21 insertions(+), 26 deletions(-) diff --git a/client/Maestro/Sources/NexioRESTSource.cs b/client/Maestro/Sources/NexioRESTSource.cs index 2bed6e43..d57f3bb5 100644 --- a/client/Maestro/Sources/NexioRESTSource.cs +++ b/client/Maestro/Sources/NexioRESTSource.cs @@ -224,8 +224,8 @@ namespace Maestro.Sources { item.ID = token[ID].ToString(); item.Name = token[LONGNAMEID].ToString() + MXFEXT; item.Agency = token[EXTAGENCY]?.ToString(); - item.Created = DateTime.Parse(token[RECORDDATE]?.ToString()); - item.Modified = DateTime.Parse(token[MODIFIED]?.ToString()); + //item.Created = token.Value(RECORDDATE); + item.Modified = token.Value(MODIFIED); int d = token.Value(DURATION); item.Duration = new Timecode(d).ToString(); } diff --git a/server/-configuration/run-mediacube-server.launch b/server/-configuration/run-mediacube-server.launch index fd9c1e1d..cae3cc97 100644 --- a/server/-configuration/run-mediacube-server.launch +++ b/server/-configuration/run-mediacube-server.launch @@ -19,7 +19,7 @@ - + diff --git a/server/-product/mediacube.product b/server/-product/mediacube.product index d0b99b7e..02a52595 100644 --- a/server/-product/mediacube.product +++ b/server/-product/mediacube.product @@ -48,6 +48,10 @@ -Djobengine.selenio.projectfilepath=\\10.10.1.71\Data\Blueprints\MP4_H264_AAC.zenium #Nexio +-Djobengine.nexio.db.url=jdbc:sqlserver://10.10.1.59:1433;databaseName=NXDB; +-Djobengine.nexio.db.user=sa +-Djobengine.nexio.db.password=resolve +-Dnexio.useMOSGateway=true -Dnexio.host=10.10.1.55 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts diff --git a/server/user.jobengine.executors/config/scheduledjobs.json b/server/user.jobengine.executors/config/scheduledjobs.json index 95786867..df57e526 100644 --- a/server/user.jobengine.executors/config/scheduledjobs.json +++ b/server/user.jobengine.executors/config/scheduledjobs.json @@ -78,18 +78,8 @@ ] }, { - "active": false, - "name" : "OCTOPUS adatok szinkronizálása", - "template": "sync-octopus.xml", - "executeimmediate": true, - "cronexpression": "0/20 * * * * ?", - "parameters": [ - {"name": "forceFull", "value": false, "type": "java.lang.Boolean"} - ] - }, - { "active": true, - "name" : "OCTOPUS adatok teljes szinkronizálása", + "name" : "OCTOPUS adatok szinkronizálása", "template": "sync-octopus.xml", "executeimmediate": false, "cronexpression": "0/30 * * * * ?", diff --git a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java index 86c3b18f..007b6f6e 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java @@ -287,14 +287,14 @@ public class NexioClipEventDispatcher implements ClipEventListener { } /* - + int c = connection.read(buffer, 0, 2); //2 bytes hosszan az idokozben hozzaadott id-k szamossaga if (c < 2) { throw new ProtocolException("c, 2, 2"); } //MSB, LSB - + return nofIds; */ return ret; @@ -351,11 +351,11 @@ public class NexioClipEventDispatcher implements ClipEventListener { String xid = clip.getString(LONGNAMEID); String id = clip.getString(ID); - BasicDBObject clipForXID = (BasicDBObject) collection.findOne(new BasicDBObject(LONGNAMEID, xid)); + BasicDBObject clipForName = (BasicDBObject) collection.findOne(new BasicDBObject(LONGNAMEID, xid)); BasicDBObject clipForID = (BasicDBObject) collection.findOne(new BasicDBObject(ID, id)); - //rename-nel a clipForXID null lesz de a clipForID nem ezert nem kell create - if (clipForXID == null && clipForID == null) { + //rename-nel a clipForName null lesz de a clipForID nem ezert nem kell create + if (clipForName == null && clipForID == null) { collection.save(clip); onCreate(clip); } else { @@ -364,8 +364,9 @@ public class NexioClipEventDispatcher implements ClipEventListener { if (!clip.equals(clipForID)) { collection.save(clip); onUpdate(clip); - } else - logger.warn("Not found {}, XID based clip is {}", id, clipForXID.toPrettyString(null)); + } + } else { + logger.error("Not found {}, XID based clip is {}", id, clipForName.toPrettyString(null)); } } } diff --git a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java index b6c4a6b8..55d4dd28 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java @@ -279,7 +279,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener { } private void transferClips(Connection con, DBCollection collection) { - logger.info("Transfering clips from NEXIO MOS Gateway {}", con.toString()); + logger.info("Transfering clips from NEXIO MOS Gateway"); String querySQL = "SELECT cd.id, c.longnameid, c.recorddate, c.extagency, c.killdate, cd.modifiedtimestamp, cd.duration, cd.videoformat, cd.videobitrate FROM ClipsTbl c LEFT OUTER JOIN ClipsDomainsTbl cd ON (cd.longnameid = c.longnameid)"; logger.debug("Executing statement: {}", querySQL); int count = 0; @@ -293,7 +293,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener { clip.put(VIDEOFORMAT, rs.getString(VIDEOFORMAT)); clip.put(DURATION, rs.getLong(DURATION)); clip.put(MODIFIEDTIMESTAMP, rs.getTimestamp(MODIFIEDTIMESTAMP)); - clip.put(RECORDDATE, rs.getTimestamp(RECORDDATE).getTime()); + clip.put(RECORDDATE, rs.getTimestamp(RECORDDATE)); clip.put(KILLDATE, rs.getTimestamp(KILLDATE)); collection.insert(clip); count++; diff --git a/server/user.jobengine.osgi.commons/src/user/commons/octopus/IOctopusAPI.java b/server/user.jobengine.osgi.commons/src/user/commons/octopus/IOctopusAPI.java index d8a8baec..69d3e8d4 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/octopus/IOctopusAPI.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/octopus/IOctopusAPI.java @@ -12,7 +12,7 @@ public interface IOctopusAPI { static final String TIME_COLLECTION_NAME = "time"; static final String LASTUPDATE_TIME = "lastUpdateTime"; static final String NEXIO_MOS = "NEXIO.MOS"; - static final String PARENT_STORY_ID = "ParentStoryId"; + static final String PARENT_STORY_ID = "parentStoryId"; static final String VALUE = "value"; static final String CUSTOM_COLUMNS = "customColumns"; static final String MOS_ID = "mosId"; diff --git a/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java b/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java index 87a3fcb0..3f57fb48 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java @@ -885,7 +885,7 @@ public class OctopusDataMiner implements Runnable { } if (save) { - logger.info("Saving {}", newItem.toPrettyString(null)); + logger.info("Saving to {} item {}", oldCollectionName, id); oldCollection.save(newItem); } } diff --git a/server/user.jobengine.osgi.server/pages/index.zul b/server/user.jobengine.osgi.server/pages/index.zul index 911d0082..853cce39 100644 --- a/server/user.jobengine.osgi.server/pages/index.zul +++ b/server/user.jobengine.osgi.server/pages/index.zul @@ -57,7 +57,7 @@ - +
-- 2.54.0