long sessionConnectTime = 0;
long startTime = (new java.util.Date()).getTime();
String whereClause;
+ String orderBy;
Entity currentMedia;
MirMedia currentMediaHandler;
EntityList batchEntityList;
int contentBatchsize =
Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
+ orderBy = "date desc, webdb_lastchange desc";
// get batch of non-produced medias, that are to be published
whereClause="is_published='1'";
if (force==false) whereClause += " and is_produced='0'";
batchEntityList = getStorage().selectByWhereClause(whereClause,
- null, 0, contentBatchsize);
+ orderBy, 0, contentBatchsize);
while (batchEntityList != null) {
for(int i=0;i<batchEntityList.size();i++) {
// if next batch get it...
if (batchEntityList.hasNextBatch()){
batchEntityList = uploadedMediaModule.getByWhereClause(whereClause,
- null, batchEntityList.getNextBatch(),contentBatchsize);
+ orderBy, batchEntityList.getNextBatch(),contentBatchsize);
} else {
batchEntityList=null;
}