From: Vásáry Dániel Date: Wed, 4 Jul 2018 13:13:17 +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=b261c99ac4b1dc1df93a52357830fb7cbb3df286;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C31146 --- diff --git a/server/-configuration/scheduledjobs.json b/server/-configuration/scheduledjobs.json index 60a7180f..de2427f5 100644 --- a/server/-configuration/scheduledjobs.json +++ b/server/-configuration/scheduledjobs.json @@ -68,7 +68,7 @@ "template": "sys-import-morpheus-missing-materials.xml", "cronexpression": "0 0 0/1 1/1 * ? *", "parameters": [ - {"name": "csvFilePath", "value": "/mnt/MORPHEUS", "type": "java.lang.String"}, + {"name": "csvFilePath", "value": "c:\\temp\\__", "type": "java.lang.String"}, {"name": "processedFolder", "value": "DONE", "type": "java.lang.String"}, {"name": "targetPath", "value": "/mnt/ISILON/ARCHIVE_RESTORE", "type": "java.lang.String"} ] diff --git a/server/user.jobengine.osgi.commons/src/user/commons/nosql/NoSQLUtils.java b/server/user.jobengine.osgi.commons/src/user/commons/nosql/NoSQLUtils.java index fad74d42..ac57183a 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/nosql/NoSQLUtils.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/nosql/NoSQLUtils.java @@ -10,6 +10,7 @@ import org.apache.logging.log4j.Logger; import com.ibm.nosql.json.api.BasicDBList; import com.ibm.nosql.json.api.BasicDBObject; import com.ibm.nosql.json.api.DB; +import com.ibm.nosql.json.api.DBCollection; import com.ibm.nosql.json.api.DBCursor; import com.ibm.nosql.json.api.DBObject; import com.ibm.nosql.json.api.NoSQLClient; @@ -91,11 +92,17 @@ public class NoSQLUtils { public static List asList(DBCursor cursor) { List result = null; - if (cursor.hasNext()) - result = cursor.toArray(); - cursor.close(); - if (result == null) - result = new ArrayList<>(); + try { + cursor.lazyFetch(); + while (cursor.hasNext()) { + DBObject obj = cursor.next(); + if (result == null) + result = new ArrayList<>(); + result.add(obj); + } + } finally { + cursor.close(); + } return result; } @@ -113,6 +120,10 @@ public class NoSQLUtils { return result; } + public static DBCollection collection(String name) { + return getNoSQLDB().getCollection(name); + } + public static DB getNoSQLDB() { try { // if (noSQLClient == null) @@ -122,5 +133,4 @@ public class NoSQLUtils { } return noSQLClient; } - } 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 5013aa97..86360d46 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 @@ -48,6 +48,8 @@ public interface IOctopusAPI { static final String STORYID = "storyId"; static final String FORMAT = "format"; static final String REPORTERS = "reporters"; + static final String $DATE = "$date"; + static final String $ELEMMATCH = "$elemMatch"; DBObject getRundown(Date scheduledDate); diff --git a/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusAPI.java b/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusAPI.java index df2e0300..4244dd5d 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusAPI.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusAPI.java @@ -20,8 +20,6 @@ import user.commons.nosql.NoSQLUtils; public class OctopusAPI implements IOctopusAPI { //private static final Logger logger = LogManager.getLogger(); - private static final String $DATE = "$date"; - private static final String $ELEMMATCH = "$elemMatch"; private DB db; public OctopusAPI() throws SQLException { diff --git a/server/user.jobengine.osgi.server/img/ic_delete_forever_black_18dp.png b/server/user.jobengine.osgi.server/img/ic_delete_forever_black_18dp.png new file mode 100644 index 00000000..3a251b69 Binary files /dev/null and b/server/user.jobengine.osgi.server/img/ic_delete_forever_black_18dp.png differ diff --git a/server/user.jobengine.osgi.server/pages/index.zul b/server/user.jobengine.osgi.server/pages/index.zul index 697ac54c..fa02bd7a 100644 --- a/server/user.jobengine.osgi.server/pages/index.zul +++ b/server/user.jobengine.osgi.server/pages/index.zul @@ -69,7 +69,7 @@
-