ecotag: now closing all DMS properly
This commit is contained in:
@ -64,10 +64,10 @@ def run(config):
|
||||
ref_view_name = ref[1]
|
||||
|
||||
# Check that the threshold demanded is greater than or equal to the threshold used to build the reference database
|
||||
if config['ecotag']['threshold'] < eval(i_dms[ref_view_name].comments["ref_db_threshold"]) :
|
||||
if config['ecotag']['threshold'] < eval(ref_dms[ref_view_name].comments["ref_db_threshold"]) :
|
||||
print("Error: The threshold demanded (%f) is lower than the threshold used to build the reference database (%f).",
|
||||
config['ecotag']['threshold'], i_dms[ref_view_name].comments["ref_db_threshold"])
|
||||
|
||||
config['ecotag']['threshold'], ref_dms[ref_view_name].comments["ref_db_threshold"])
|
||||
|
||||
# Open the output: only the DMS
|
||||
output = open_uri(config['obi']['outputURI'],
|
||||
input=False,
|
||||
@ -126,9 +126,11 @@ def run(config):
|
||||
# If the input and the output DMS are different, delete the temporary result view in the input DMS
|
||||
if i_dms != o_dms:
|
||||
View.delete_view(i_dms, o_view_name)
|
||||
o_dms.close()
|
||||
o_dms.close(force=True)
|
||||
|
||||
i_dms.close()
|
||||
taxo_dms.close(force=True)
|
||||
ref_dms.close(force=True)
|
||||
i_dms.close(force=True)
|
||||
|
||||
logger("info", "Done.")
|
||||
|
||||
|
@ -94,16 +94,16 @@ cdef class DMS(OBIWrapper):
|
||||
return dms
|
||||
|
||||
|
||||
def close(self) :
|
||||
def close(self, force=False) :
|
||||
'''
|
||||
Closes the DMS instance and free the associated memory
|
||||
Closes the DMS instance and free the associated memory (no counter, closing is final)
|
||||
|
||||
The `close` method is automatically called by the object destructor.
|
||||
'''
|
||||
cdef OBIDMS_p pointer = self.pointer()
|
||||
if self.active() :
|
||||
OBIWrapper.close(self)
|
||||
if (obi_close_dms(pointer, False)) < 0 :
|
||||
if (obi_close_dms(pointer, force=force)) < 0 :
|
||||
raise Exception("Problem closing an OBIDMS")
|
||||
|
||||
|
||||
@ -254,7 +254,8 @@ cdef class DMS(OBIWrapper):
|
||||
# bash command history property getter
|
||||
@property
|
||||
def bash_history(self):
|
||||
s = b"#!/bin/bash\n\n"
|
||||
#s = b"#!${bash}/bin/bash\n\n"
|
||||
s = b""
|
||||
first = True
|
||||
for command in self.command_line_history:
|
||||
s+=b"#"
|
||||
|
@ -1,5 +1,5 @@
|
||||
major = 3
|
||||
minor = 0
|
||||
serial= '0-beta11'
|
||||
serial= '0-beta12a'
|
||||
|
||||
version ="%d.%02d.%s" % (major,minor,serial)
|
||||
|
Reference in New Issue
Block a user