Skip to content

Comments

R test 2.46.0, NEED TO CREATE BASE BRANCH#16

Draft
shahaab-m wants to merge 9 commits intorelease_2.46.0from
r_test_2.46.0
Draft

R test 2.46.0, NEED TO CREATE BASE BRANCH#16
shahaab-m wants to merge 9 commits intorelease_2.46.0from
r_test_2.46.0

Conversation

@shahaab-m
Copy link

@shahaab-m shahaab-m commented Aug 6, 2025

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'

@shahaab-m shahaab-m changed the title R test 2.46.0 R test 2.46.0, NEED TO CREATE BASE BRANCH Aug 6, 2025
@shahaab-m shahaab-m marked this pull request as draft August 6, 2025 06:12
@shahaab-m shahaab-m changed the base branch from release_2.39.0 to release_2.46.0 August 6, 2025 11:26
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()
Copy link
Contributor

Choose a reason for hiding this comment

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

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))
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Author

Choose a reason for hiding this comment

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

checking again

Copy link
Author

Choose a reason for hiding this comment

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

image image image

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