diff --git a/BUGs b/BUGs index 388b451..314a6f7 100644 --- a/BUGs +++ b/BUGs @@ -1,7 +1,11 @@ -### Next: 8 -BUG-2: Fix the function FixPath so its not just C:, use isPosixPath instead... -BUG-3: import job (first time, does not update with #files as it runs) -BUG-4: Duration is borked and comes out as -1 day under jobs (windows created jobs only) -BUG-6: add a new file (e.g. touch an image in the import dir), and keep_dir[] has missing key -BUG-7: thumbnail orientation issues (see latest image from my phone - of laptop) -BUG-x: Ai ref img jobs are looping, needs fix +### Next: 12 + BUG-2: Fix the function FixPath so its not just C:, use isPosixPath instead... + BUG-3: import job (first time, does not update with #files as it runs) + BUG-4: Duration is borked and comes out as -1 day under jobs (windows created jobs only) + BUG-6: add a new file (e.g. touch an image in the import dir), and keep_dir[] has missing key + BUG-7: thumbnail orientation issues (see latest image from my phone - of laptop) + BUG-8: cascading failure jobs are needed + BUG-9: import_path's and entry path_prefix issues when ProcessFilsInDir (in fact, should I really wrap all of that so no one sees its) +BUG-10: gen*details will stop if no change to top-level dir, but not look in subdirs +BUG-11: Ai ref img jobs are looping, needs fix + diff --git a/pa_job_manager.py b/pa_job_manager.py index d71e1c5..112e9a7 100644 --- a/pa_job_manager.py +++ b/pa_job_manager.py @@ -462,6 +462,7 @@ def JobNewImportDir(job): dir.num_files=len(files)+len(subdirs) dir.last_import_date = time.time() job.num_files=overall_file_cnt + job.current_file_num=overall_file_cnt FinishJob(job, "Finished Importing: {} - Found {} new files".format( path, overall_file_cnt ) ) ####### NEED TO FIX THIS BASED ON os.walk contents import_dir=session.query(Dir).filter(Dir.path_prefix==symlink).first() @@ -658,6 +659,7 @@ def ProcessFilesInDir(job, e, file_func, go_into_dir_func): file_func(job, e) else: dir=session.query(Dir).filter(Dir.eid==e.id).first() + job.current_file_num+=1 # if this func returns if not go_into_dir_func(dir): return diff --git a/person.py b/person.py index 8c7c2e3..a5af609 100644 --- a/person.py +++ b/person.py @@ -24,7 +24,7 @@ class Person(db.Model): class File_Person_Link(db.Model): __tablename__ = "file_person_link" - file_id = db.Column(db.Integer, db.ForeignKey('file.id'), unique=True, nullable=False, primary_key=True) + file_eid = db.Column(db.Integer, db.ForeignKey('file.eid'), unique=True, nullable=False, primary_key=True) person_id = db.Column(db.Integer, db.ForeignKey('person.id'), unique=True, nullable=False, primary_key=True) def __repr__(self): diff --git a/tables.sql b/tables.sql index 126f019..ad17e7f 100644 --- a/tables.sql +++ b/tables.sql @@ -24,7 +24,7 @@ create table ENTRY_DIR_LINK ( entry_id integer, dir_eid integer, create table PERSON ( ID integer, TAG varchar(48), FIRSTNAME varchar(48), SURNAME varchar(48), constraint PK_PERSON_ID primary key(ID) ); -create table REFIMG ( ID integer, FNAME varchar(256), ENCODINGS varchar, +create table REFIMG ( ID integer, FNAME varchar(256), ENCODINGS bytea, constraint PK_REFIMG_ID primary key(ID) ); create table FILE_PERSON_LINK ( FILE_ID integer, PERSON_ID integer,