cleanup print statements

This commit is contained in:
Blake Blackshear 2022-04-16 08:43:49 -05:00
parent 12abbc59d6
commit b86b2d6602
2 changed files with 3 additions and 1 deletions

View File

@ -169,6 +169,7 @@ def send_to_plus(id):
filename = f"{event.camera}-{event.id}-clean.png" filename = f"{event.camera}-{event.id}-clean.png"
image = cv2.imread(os.path.join(CLIPS_DIR, filename)) image = cv2.imread(os.path.join(CLIPS_DIR, filename))
except Exception: except Exception:
logger.error(f"Unable to load clean png for event: {event.id}")
return make_response( return make_response(
jsonify( jsonify(
{"success": False, "message": "Unable to load clean png for event"} {"success": False, "message": "Unable to load clean png for event"}

View File

@ -109,9 +109,10 @@ class ObjectTracker:
obj["motionless_count"] - self.detect_config.stationary.threshold obj["motionless_count"] - self.detect_config.stationary.threshold
> max_frames > max_frames
): ):
print(f"expired: {obj['motionless_count']}")
return True return True
return False
def update(self, id, new_obj): def update(self, id, new_obj):
self.disappeared[id] = 0 self.disappeared[id] = 0
# update the motionless count if the object has not moved to a new position # update the motionless count if the object has not moved to a new position