comment out sleep again, also removed some debugs, and converted some to AddLogForJob
This commit is contained in:
@@ -59,6 +59,7 @@ class FileData():
|
|||||||
tags = exifread.process_file(f)
|
tags = exifread.process_file(f)
|
||||||
except:
|
except:
|
||||||
print('NO EXIF TAGS?!?!?!?')
|
print('NO EXIF TAGS?!?!?!?')
|
||||||
|
AddLogForJob(job, "WARNING: No EXIF TAF found for: {}".format(file))
|
||||||
f.close()
|
f.close()
|
||||||
raise
|
raise
|
||||||
f.close()
|
f.close()
|
||||||
@@ -128,7 +129,7 @@ class FileData():
|
|||||||
paths = settings.import_path.split("#")
|
paths = settings.import_path.split("#")
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
print( "GenerateFileData: Checking {}".format( path ) )
|
AddLogForJob(job, "Checking Import Directory: {}".format( path ) )
|
||||||
path = self.FixPath(path)
|
path = self.FixPath(path)
|
||||||
if os.path.exists( path ):
|
if os.path.exists( path ):
|
||||||
# to serve static content of the images, we create a symlink
|
# to serve static content of the images, we create a symlink
|
||||||
@@ -145,7 +146,7 @@ class FileData():
|
|||||||
fname=file.replace(path, "")
|
fname=file.replace(path, "")
|
||||||
stat = os.stat(file)
|
stat = os.stat(file)
|
||||||
if last_import_date == 0 or stat.st_ctime > last_import_date:
|
if last_import_date == 0 or stat.st_ctime > last_import_date:
|
||||||
print( "{} - {} is newer than {}".format( file, stat.st_ctime, last_import_date ) )
|
AddLogForJob(job, "DEBUG: {} - {} is newer than {}".format( file, stat.st_ctime, last_import_date ) )
|
||||||
fthumbnail = None
|
fthumbnail = None
|
||||||
if os.path.isdir(file):
|
if os.path.isdir(file):
|
||||||
ftype = 'Directory'
|
ftype = 'Directory'
|
||||||
@@ -273,7 +274,6 @@ def InitialiseManager():
|
|||||||
global pa_eng
|
global pa_eng
|
||||||
|
|
||||||
pa_eng=session.query(PA_JobManager).first()
|
pa_eng=session.query(PA_JobManager).first()
|
||||||
print(pa_eng)
|
|
||||||
if( pa_eng == None ):
|
if( pa_eng == None ):
|
||||||
pa_eng = PA_JobManager(state='Initialising', num_active_jobs=0, num_completed_jobs=0 )
|
pa_eng = PA_JobManager(state='Initialising', num_active_jobs=0, num_completed_jobs=0 )
|
||||||
session.add(pa_eng)
|
session.add(pa_eng)
|
||||||
@@ -288,7 +288,6 @@ def AddLogForJob(job, message, current_file=''):
|
|||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
def RunJob(job):
|
def RunJob(job):
|
||||||
print("Run job: {}, pa_eng state: {}, internal job state: {}".format( job.name, job.pa_job_state, job.state) )
|
|
||||||
try:
|
try:
|
||||||
if job.name =="scannow":
|
if job.name =="scannow":
|
||||||
JobScanNow(job)
|
JobScanNow(job)
|
||||||
|
|||||||
Reference in New Issue
Block a user