Enhanced debug logging in bot initialization

Introduced additional debug log entries in the `GPTBot` class to provide clarity on the initial sync and callback setup process. This helps with monitoring and troubleshooting during the early stages of bot deployment, making it easier to pinpoint issues around bot startup and room joining behavior.
Bumped project version to 0.3.3-dev to signal ongoing development.
This commit is contained in:
Kumi 2023-12-29 20:37:42 +01:00
parent f206aa8f0f
commit c7e448126d
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 6 additions and 1 deletions

View file

@ -7,7 +7,7 @@ allow-direct-references = true
[project] [project]
name = "matrix-gptbot" name = "matrix-gptbot"
version = "0.3.2" version = "0.3.3-dev"
authors = [ authors = [
{ name="Kumi Mitterer", email="gptbot@kumi.email" }, { name="Kumi Mitterer", email="gptbot@kumi.email" },

View file

@ -816,6 +816,9 @@ class GPTBot:
self.matrix_client.config = client_config self.matrix_client.config = client_config
# Run initial sync (includes joining rooms) # Run initial sync (includes joining rooms)
self.logger.log("Running initial sync...", "debug")
sync = await self.matrix_client.sync(timeout=30000, full_state=True) sync = await self.matrix_client.sync(timeout=30000, full_state=True)
if isinstance(sync, SyncResponse): if isinstance(sync, SyncResponse):
await self.response_callback(sync) await self.response_callback(sync)
@ -825,6 +828,8 @@ class GPTBot:
# Set up callbacks # Set up callbacks
self.logger.log("Setting up callbacks...", "debug")
self.matrix_client.add_event_callback(self.event_callback, Event) self.matrix_client.add_event_callback(self.event_callback, Event)
self.matrix_client.add_response_callback(self.response_callback, Response) self.matrix_client.add_response_callback(self.response_callback, Response)