Bug obiuniq - don't clean the chunks

This commit is contained in:
Eric Coissac
2025-10-28 13:34:18 +01:00
parent 5150947e23
commit 7f4ebe757e
2 changed files with 4 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import (
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiformats" "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiformats"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter" "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq" "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
) )
// tempDir creates a temporary directory with a prefix "obiseq_chunks_" // tempDir creates a temporary directory with a prefix "obiseq_chunks_"
@@ -74,6 +75,7 @@ func find(root, ext string) []string {
// status of each batch. // status of each batch.
func ISequenceChunkOnDisk(iterator obiiter.IBioSequence, func ISequenceChunkOnDisk(iterator obiiter.IBioSequence,
classifier *obiseq.BioSequenceClassifier) (obiiter.IBioSequence, error) { classifier *obiseq.BioSequenceClassifier) (obiiter.IBioSequence, error) {
obiutils.RegisterAPipe()
dir, err := tempDir() dir, err := tempDir()
if err != nil { if err != nil {
return obiiter.NilIBioSequence, err return obiiter.NilIBioSequence, err
@@ -86,7 +88,7 @@ func ISequenceChunkOnDisk(iterator obiiter.IBioSequence,
go func() { go func() {
defer func() { defer func() {
os.RemoveAll(dir) os.RemoveAll(dir)
log.Debugln("Clear the cache directory") obiutils.UnregisterPipe()
}() }()
newIter.Wait() newIter.Wait()

View File

@@ -8,7 +8,7 @@ import (
// corresponds to the last commit, and not the one when the file will be // corresponds to the last commit, and not the one when the file will be
// commited // commited
var _Commit = "29bf4ce" var _Commit = "5150947"
var _Version = "Release 4.4.0" var _Version = "Release 4.4.0"
// Version returns the version of the obitools package. // Version returns the version of the obitools package.