mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 02:24:20 +00:00
add some debug logs
This commit is contained in:
parent
8b8939b17a
commit
e2268f9234
@ -412,6 +412,7 @@ class CorpusFile(db.Model):
|
||||
|
||||
def delete(self):
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.warning('Called CorpusFile.delete')
|
||||
path = os.path.join(current_app.config['OPAQUE_STORAGE_DIRECTORY'],
|
||||
self.dir,
|
||||
self.filename)
|
||||
@ -459,13 +460,20 @@ class Corpus(db.Model):
|
||||
|
||||
def delete(self):
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.warning('Called Corpus.delete')
|
||||
for corpus_file in self.files:
|
||||
corpus_file.delete()
|
||||
logger.warning('bis hierhin und nicht weiter')
|
||||
logger.warning('base_dir: {}'.format(current_app.config['OPAQUE_STORAGE_DIRECTORY']))
|
||||
logger.warning('user_id: {}'.format(self.user_id))
|
||||
logger.warning('id: {}'.format(self.id))
|
||||
path = os.path.join(current_app.config['OPAQUE_STORAGE_DIRECTORY'],
|
||||
self.user_id,
|
||||
'corpora',
|
||||
self.id)
|
||||
logger.warning(path)
|
||||
try:
|
||||
logger.warning('Try to remove {}'.format(path))
|
||||
shutil.rmtree(path)
|
||||
except:
|
||||
logger.warning('[ERROR] Corpus.delete')
|
||||
|
Loading…
Reference in New Issue
Block a user