log cleanup

This commit is contained in:
2021-10-10 12:16:06 +11:00
parent 58889c394f
commit 28a1e73c54

View File

@@ -1152,13 +1152,13 @@ def JobImportDir(job):
settings = session.query(Settings).first()
path=[jex.value for jex in job.extra if jex.name == "path"][0]
path_type=[jex.value for jex in job.extra if jex.name == "path_type"][0]
AddLogForJob(job, f"Checking {path_type} Directory: {path}" )
ptype = session.query(PathType).get(path_type)
AddLogForJob(job, f"Checking {ptype.name} Directory: {path}" )
if DEBUG:
print( f"DEBUG: Checking Directory: {path}" )
if not os.path.exists( path ):
FinishJob( job, f"Finished Importing: {path} -- Path does not exist", "Failed" )
return
ptype = session.query(PathType).get(path_type)
symlink=SymlinkName(ptype.name, path, path)
# create/find the Path