50 lines
1.9 KiB
Plaintext
50 lines
1.9 KiB
Plaintext
### DB
|
|
* create tables
|
|
|
|
### BACKEND
|
|
* need a "batch" processing system that uses ionice to minimise load on mara and is threaded and used DB to interact with gunicorn'd pa
|
|
|
|
DB tables to share between pa and pa_jobs:
|
|
create table pa_job_state ( state string, num_jobs_active integer, num_jobs_complete )
|
|
create table pa_jobs ( job_id, <...> )
|
|
|
|
pa_jobs (threaded python add separate from photoassistant)
|
|
takes over files.py
|
|
has ai.py
|
|
needs broad jobs to:
|
|
find files in {import_dir & storage_dir}
|
|
calc thumbs/hashes { " }
|
|
run AI against { " }
|
|
move files from import_dir to appropriate sub_dir in storage_dir (list will come from pa web)
|
|
|
|
to keep html easy, can keep routes:
|
|
/jobs/import/ -> importlog.html
|
|
/jobs/ai/ -> importlog.html???
|
|
/jobs/move/ -> importlog.html???
|
|
|
|
but not sure if any job won't have passes, num files, etc. BUT if it ever does this is how we deal with it
|
|
|
|
on start-up:
|
|
set state: initialising
|
|
get settings, if no import_dir -> set state: Configuration Needed
|
|
check DB for any files
|
|
-> if some, set state: awaiting jobs
|
|
-> if none, set state: Find Files (run that code)
|
|
-> when job finished, then Import Files (import_dir only)
|
|
-> when job finished, the set state: awating jobs
|
|
|
|
implications, pa_job needs to know if it depends on another, e.g. do find before import (in example above)
|
|
pa web needs to show status for the job engine IN YOUR FACE when not at awaiting jobs yet, afterwards, maybe a simple jobs(<badge>) that is clickable on the gui?
|
|
|
|
|
|
### UI
|
|
|
|
### AI
|
|
* store reference images (UI allows this now)
|
|
* check images
|
|
|
|
### SORTER
|
|
* date stuff
|
|
* exif processing?
|
|
* location stuff
|