bug fix: pending connection
set version: 1.0.2 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/storage-manager-trigger@98033 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9387a59f8f
commit
b6f83d8f51
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.gcube.contentmanagement</groupId>
|
<groupId>org.gcube.contentmanagement</groupId>
|
||||||
<artifactId>storage-manager-trigger</artifactId>
|
<artifactId>storage-manager-trigger</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.0.2-SNAPSHOT</version>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</connection>
|
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</connection>
|
||||||
<developerConnection>scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</developerConnection>
|
<developerConnection>scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</developerConnection>
|
||||||
|
|
|
@ -77,6 +77,7 @@ public class JsonParser extends Thread{
|
||||||
public void run() {
|
public void run() {
|
||||||
while(true){
|
while(true){
|
||||||
DBObject x=null;
|
DBObject x=null;
|
||||||
|
MongoDB mongo=null;
|
||||||
try{
|
try{
|
||||||
x=c.get();
|
x=c.get();
|
||||||
logger.info("Consumer #" + this.number + " got: " + x);
|
logger.info("Consumer #" + this.number + " got: " + x);
|
||||||
|
@ -108,7 +109,7 @@ public class JsonParser extends Thread{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// operation=mappingOperationField(op, id, delete, lastAccess);
|
// operation=mappingOperationField(op, id, delete, lastAccess);
|
||||||
MongoDB mongo=new MongoDB(server, user, password);
|
mongo=new MongoDB(server, user, password);
|
||||||
StorageStatusRecord ssr=mongo.update(lastUser, length, 1, lastOperation);
|
StorageStatusRecord ssr=mongo.update(lastUser, length, 1, lastOperation);
|
||||||
mongo.close();
|
mongo.close();
|
||||||
//call to the accounting library
|
//call to the accounting library
|
||||||
|
@ -123,8 +124,11 @@ public class JsonParser extends Thread{
|
||||||
}
|
}
|
||||||
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("ERROR Processing record: "+x+" Exception throws: "+e.getMessage());
|
e.printStackTrace();
|
||||||
|
logger.error("ERROR Processing record: "+x+" Exception throws: "+e.getStackTrace());
|
||||||
logger.info("skip to next record ");
|
logger.info("skip to next record ");
|
||||||
|
if(mongo!=null)
|
||||||
|
mongo.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue