Skip to content

Commit

Permalink
put back alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoLostanlen committed Jul 15, 2024
1 parent db97820 commit 73d86bd
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pyroengine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ async def run(self, period: int = 30) -> None:
self.check_day_time()

Check warning on line 159 in pyroengine/core.py

View check run for this annotation

Codecov / codecov/patch

pyroengine/core.py#L159

Added line #L159 was not covered by tests

if self.day_time:
start_time = time.time()
image_queue: asyncio.Queue[Any] = asyncio.Queue()

Check warning on line 162 in pyroengine/core.py

View check run for this annotation

Codecov / codecov/patch

pyroengine/core.py#L162

Added line #L162 was not covered by tests

# Start the image processor task
Expand All @@ -175,13 +174,11 @@ async def run(self, period: int = 30) -> None:
await image_queue.put(None)
await processor_task # Ensure the processor task completes

Check warning on line 175 in pyroengine/core.py

View check run for this annotation

Codecov / codecov/patch

pyroengine/core.py#L174-L175

Added lines #L174 - L175 were not covered by tests

logging.info(f"Total time for capturing and processing images: {time.time() - start_time:.2f} seconds")

# # Process alerts
# try:
# self.engine._process_alerts()
# except Exception as e:
# logging.error(f"Error processing alerts: {e}")
# Process alerts
try:
self.engine._process_alerts()
except Exception as e:
logging.error(f"Error processing alerts: {e}")

except Exception as e:
logging.warning(f"Analyze stream error: {e}")

Check warning on line 184 in pyroengine/core.py

View check run for this annotation

Codecov / codecov/patch

pyroengine/core.py#L183-L184

Added lines #L183 - L184 were not covered by tests
Expand Down

0 comments on commit 73d86bd

Please sign in to comment.