R test 2.46.0, NEED TO CREATE BASE BRANCH#16
Draft
shahaab-m wants to merge 9 commits intorelease_2.46.0from
Draft
R test 2.46.0, NEED TO CREATE BASE BRANCH#16shahaab-m wants to merge 9 commits intorelease_2.46.0from
shahaab-m wants to merge 9 commits intorelease_2.46.0from
Conversation
Comment on lines
32
to
39
| # Set up a background asyncio event loop for async message handlers | ||
| self.loop = asyncio.new_event_loop() | ||
| self.loop_thread = threading.Thread(target=self._start_loop, daemon=True) | ||
| self.loop_thread.start() | ||
|
|
||
| def _start_loop(self): | ||
| asyncio.set_event_loop(self.loop) | ||
| self.loop.run_forever() |
Contributor
There was a problem hiding this comment.
why here, why not in listen?
| logging.warning('Channel closed before ack') | ||
|
|
||
| # Submit task to background asyncio loop | ||
| self.loop.call_soon_threadsafe(lambda: asyncio.ensure_future(handle_and_ack(), loop=self.loop)) |
Contributor
There was a problem hiding this comment.
use single threaded multi queue listener with a consumer that is listening to at-least two queues, and they are both requiring DB connection, push jobs in both queues, at-least 2 jobs in each queue and verify all the 4 jobs are completed. because our DB connection is not thread safe, hence we had taken the earlier approach.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



what: replace -> run_until_complete with call_soon_threadsafe.
why: so that parallely heatbeat is also sent and consumer does its job of generating pdf
concerns: the only change which we need to discuss is related to updating pydantic and starlette everywhere
cgf consumer is using py-messaging-library -> release_2.15.0_version_upgrade
but the latest branch in py-messaging-library is release_2.38.0
py-messaging-library -> release_2.15.0_version_upgrade
'pydantic==2.6.4',
'starlette==0.36.3'
py-messaging-library -> release_2.38.0
'pydantic==2.11.3',
'starlette==0.46.2'