Skip to content

add reconnection logic to event watcher thread#20

Closed
tulioz wants to merge 1 commit intomainfrom
event-watcher-reconnect
Closed

add reconnection logic to event watcher thread#20
tulioz wants to merge 1 commit intomainfrom
event-watcher-reconnect

Conversation

@tulioz
Copy link
Copy Markdown
Contributor

@tulioz tulioz commented Apr 7, 2026

the event watcher thread crashes silently when the redis connection drops, causing the healthz check to fail and k8s to restart the pod every ~20 minutes

@aviator-app
Copy link
Copy Markdown

aviator-app bot commented Apr 7, 2026

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.

Stack

  1. 👉 #20 add reconnection logic to event watcher thread 👈 (this pr)

See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@tulioz
Copy link
Copy Markdown
Contributor Author

tulioz commented Apr 7, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a reconnection loop with exponential backoff for the Celery event watcher and updates numerous project dependencies in the lock file. Review feedback suggests refining the backoff reset logic to prevent potential log spam during rapid connection failures and ensuring the RepeatTimer is daemonized to match the watcher thread for consistent process termination.

Comment thread celerymon/event_watcher.py
Comment thread celerymon/event_watcher.py
@tulioz tulioz force-pushed the event-watcher-reconnect branch 2 times, most recently from 372b1eb to 1bee059 Compare April 7, 2026 23:11
@tulioz
Copy link
Copy Markdown
Contributor Author

tulioz commented Apr 7, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the EventWatcher by implementing a reconnection loop with exponential backoff for the event receiver and configuring the watcher and timer threads as daemon threads. A review comment suggests further improving the system's resilience by adding error handling to the periodic event enablement timer to prevent the thread from crashing permanently during connection failures.

Comment thread celerymon/event_watcher.py
@tulioz tulioz force-pushed the event-watcher-reconnect branch from 1bee059 to d181f72 Compare April 7, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants