Skip to content

DM-55425: Update ingester so that it can close out when pods scale down - #19

Merged
bsmartradio merged 1 commit into
mainfrom
tickets/DM-55425
Aug 14, 2026
Merged

bsmartradio merged 1 commit into
mainfrom
tickets/DM-55425

Conversation

@bsmartradio

Copy link
Copy Markdown
Contributor

No description provided.

@bsmartradio
bsmartradio requested a review from dspeck1 August 6, 2026 21:34

@dspeck1 dspeck1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Two comments we reviewed to update.

Comment thread alertingest/ingester.py
self,
limit: int = -1,
commit_interval: int = 100,
auto_offset_reset: str = "latest",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should auto_offset_reset and the other values above be a variables sent in as arguments?

Comment thread alertingest/ingester.py Outdated
}
finally:
await consumer.stop()
self._executor.shutdown(wait=False)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does shutdown need to be set to True to allow any tasks to finish?

Move handle_kafka_message to async so that it doesn't slow things down

Move the shutdown to warning so it appears in logs

Update ingester to batch process messages and update unit tests

Claude assisted

Remove excess code and allow for proper multhreading

Add arguments
@bsmartradio
bsmartradio merged commit 5af43ac into main Aug 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants