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"
image = cv2.imread(os.path.join(CLIPS_DIR, filename))
except Exception:
logger.error(f"Unable to load clean png for event: {event.id}")
return make_response(
jsonify(
{"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
> max_frames
):
print(f"expired: {obj['motionless_count']}")
return True
return False
def update(self, id, new_obj):
self.disappeared[id] = 0
# update the motionless count if the object has not moved to a new position