added BUG-120, somehow losing pref info. No prints are working in PROD, so changed a lot of printf( in the F/E to SetFELog with error and persistent/cant_close set across many files. Also used opportunity to remove a few unnecessary debugs
This commit is contained in:
@@ -94,12 +94,11 @@ def AddRefimgToPerson( filename, person ):
|
||||
except Exception as e:
|
||||
# can fail "silently" here, if the face_locn worked, great, its only
|
||||
# a tmp file in /tmp - if not, the next if will send a msg to the front-end
|
||||
print( f"Failed to delete tmp file for refimg addition: {e}" )
|
||||
SetFELog( message=f"Failed to delete tmp file for refimg addition: {e}", log_level="danger", persistent=True, cant_close=True )
|
||||
|
||||
if not face_locn:
|
||||
SetFELog( f"<b>Failed to find face in Refimg:</b>", "danger" )
|
||||
raise Exception("Could not find face in uploaded reference image" )
|
||||
return
|
||||
refimg.face_top = face_locn[0]
|
||||
refimg.face_right = face_locn[1]
|
||||
refimg.face_bottom = face_locn[2]
|
||||
@@ -344,7 +343,6 @@ def add_force_match_override():
|
||||
# dont do status update here, the F/E is in the middle of a dbox, just send metadata through to the B/E
|
||||
NewJob( "metadata", num_files=0, wait_for=None, jex=jex, desc="create metadata for adding forced match" )
|
||||
|
||||
print( f"Placing an override match with face_id {face_id}, for person: {p.tag}" )
|
||||
# this will reply to the Ajax / POST, and cause the page to re-draw with new face override to person_tag
|
||||
return make_response( jsonify( person_tag=p.tag ) )
|
||||
|
||||
@@ -357,7 +355,6 @@ def remove_force_match_override():
|
||||
face_id = request.form['face_id']
|
||||
person_tag = request.form['person_tag']
|
||||
file_eid = request.form['file_eid']
|
||||
print( f"Remove override force match of face_id={face_id} to person_tag={person_tag}" )
|
||||
|
||||
FaceForceMatchOverride.query.filter( FaceForceMatchOverride.face_id==face_id ).delete()
|
||||
db.session.commit()
|
||||
@@ -383,7 +380,6 @@ def remove_force_match_override():
|
||||
def remove_no_match_override():
|
||||
face_id = request.form['face_id']
|
||||
type_id = request.form['type_id']
|
||||
print( f"Remove override of no match (type_id={type_id}) for face_id={face_id}" )
|
||||
|
||||
FaceNoMatchOverride.query.filter( FaceNoMatchOverride.face_id==face_id, FaceNoMatchOverride.type_id==type_id ).delete()
|
||||
db.session.commit()
|
||||
@@ -426,6 +422,5 @@ def add_no_match_override():
|
||||
# dont do status update here, the F/E is in the middle of a dbox, just send metadata through to the B/E
|
||||
NewJob( "metadata", num_files=0, wait_for=None, jex=jex, desc="create metadata for adding forced non-match" )
|
||||
|
||||
print( f"Placing an override of NO Match for face_id {face_id}" )
|
||||
# this will reply to the Ajax / POST, and cause the page to re-draw with new face override to person_tag
|
||||
return make_response( jsonify( type=t.name ) )
|
||||
|
||||
Reference in New Issue
Block a user