@StepEntry\r
public Object[] execute(int nexioPort, String nexioUserName, String nexioPassword, String archiveFtp, String archiveUserName, String archivePassword,\r
int daysBeforeNow, int nexioKillDateDays, String nexioAgency, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
- systemMarker = jobRuntime.getSessionMarker();\r
+ systemMarker = getMarker();\r
+ logger.info(systemMarker, "test");\r
setAndCheck(nexioPort, nexioUserName, nexioPassword, archiveFtp, archiveUserName, archivePassword, nexioKillDateDays, nexioAgency, jobEngine);\r
octopusAPI = new OctopusAPI();\r
Calendar scheduledDate = Calendar.getInstance();\r
private FileArchive processMosObject(BasicDBObject rundown, BasicDBObject story, BasicDBObject mosObject) throws Exception {\r
String mosID = mosObject.getString(IOctopusAPI.OBJ_ID);\r
if (MetadataTypeDetector.GuessMetadataType(mosID) != MetadataType.OctopusPlaceholder) {\r
- logger.trace("Skipping MOS object {}", mosID);\r
+ logger.trace(systemMarker, "Skipping MOS object {}", mosID);\r
return null;\r
}\r
DBCollection clips = db.getCollection(NEXIOCLIPS);\r
BasicDBObject clip = (BasicDBObject) clips.findOne(new BasicDBObject(LONGNAMEID, mosID));\r
if (clip == null) {\r
- logger.debug("File {} NOT exists", mosID);\r
+ logger.debug(systemMarker, "File {} NOT exists", mosID);\r
return null;\r
//throw new Exception(String.format("File NOT exists %s", mosID));\r
} else {\r
- logger.debug("File {} exists", mosID);\r
+ logger.debug(systemMarker, "File {} exists", mosID);\r
}\r
long duration = NoSQLUtils.asLong(clip, DURATION);\r
\r
if (duration == 0) {\r
- logger.debug("File {} exists with 0 frame length", mosID);\r
+ logger.debug(systemMarker, "File {} exists with 0 frame length", mosID);\r
return null;\r
}\r
if (duration == 1) {\r
- logger.debug("File {} exists with 1 frame length", mosID);\r
+ logger.debug(systemMarker, "File {} exists with 1 frame length", mosID);\r
return null;\r
}\r
return new FileArchive(mosID, duration);\r
BasicDBObject rundown = (BasicDBObject) r;\r
long rundownID = rundown.getLong(ID);\r
if (!demo)\r
- logger.info("Processing rundown {} {}", rundownID, rundown.getString(IOctopusAPI.NAME));\r
+ logger.info(systemMarker, "Processing rundown {} {}", rundownID, rundown.getString(IOctopusAPI.NAME));\r
List<DBObject> stories = octopusAPI.getRundownFullStories(rundownID);\r
if (stories == null)\r
return null;\r
//db.getCollection(ARCHIVEDRUNDOWNS).drop();\r
List<BasicDBObject> archivedRundowns = queryArchivedRundowns();\r
\r
- logger.info(getMarker(), "Found {} rundowns to archive", archivedRundowns.size());\r
+ logger.info(systemMarker, "Found {} rundowns to archive", archivedRundowns.size());\r
int index = 1;\r
\r
for (DBObject r : rundowns) {\r
BasicDBObject rundown = (BasicDBObject) r;\r
- setProgress(index * 100 / rundowns.size());\r
+ int progress = index * 100 / rundowns.size();\r
+ setProgress(progress);\r
long rundownID = NoSQLUtils.asLong(rundown, IOctopusAPI.ID);\r
String rundownName = NoSQLUtils.asString(rundown, IOctopusAPI.NAME);\r
try {\r
BasicDBObject currentRundownID = new BasicDBObject(IOctopusAPI.ID, rundownID);\r
if (!demo && archivedRundowns != null && archivedRundowns.contains(currentRundownID)) {\r
- logger.info("Skipping archived rundown {} {}", rundownID, rundownName);\r
+ logger.info(systemMarker, "Skipping archived rundown {} {}", rundownID, rundownName);\r
continue;\r
}\r
\r
RundownArchive rundownArchive = processRundow(r);\r
if (rundownArchive == null || rundownArchive.isEmpty()) {\r
if (!demo)\r
- logger.info("Skipping rundown {} {}", rundownID, rundownName);\r
+ logger.info(systemMarker, "Skipping rundown {} {}", rundownID, rundownName);\r
continue;\r
}\r
\r
if (!demo)\r
- logger.info("Saving rundown {} {}", rundownID, rundownName);\r
+ logger.info(systemMarker, "Saving rundown {} {}", rundownID, rundownName);\r
copy(rundownArchive);\r
if (!demo)\r
logger.info(systemMarker, "A '{}' tükör {}db bejátszójának archiválása sikeres volt", rundownArchive.getItemTitle(),\r
BasicDBObject story = (BasicDBObject) s;\r
String parentStoryID = story.getString(IOctopusAPI.PARENT_STORY_ID);\r
if (StringUtils.isBlank(parentStoryID)) {\r
- logger.warn("Story parentStoryID is null: {}", story.toPrettyString(null));\r
+ logger.warn(systemMarker, "Story parentStoryID is null: {}", story.toPrettyString(null));\r
return null;\r
} else\r
- logger.debug("Processing story {}", parentStoryID);\r
+ logger.info(systemMarker, "Processing story {}", parentStoryID);\r
List<BasicDBObject> mosObjects = NoSQLUtils.asList(story, IOctopusAPI.MOS_OBJECTS);\r
- if (mosObjects == null)\r
+ if (mosObjects == null) {\r
+ logger.info(systemMarker, "No MOS in story {}: {}", parentStoryID, story.toPrettyString(null));\r
+ \r
return null;\r
+ }\r
StoryArchive storyArchive = null;\r
for (BasicDBObject mosObject : mosObjects) {\r
FileArchive fileArchive = processMosObject(rundown, story, mosObject);\r