Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 9446ad2

Browse files
committed
debug errors
1 parent 1a2c5ed commit 9446ad2

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ lint:
2121
poetry run ruff check .
2222

2323
test:
24-
poetry run pytest
24+
poetry run pytest -s
2525

2626
security:
2727
poetry run bandit -r src/

src/codegate/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def serve(
120120
"""Start the codegate server."""
121121
logger = None
122122
try:
123+
click.echo("In serve")
123124
# Create provider URLs dict from CLI options
124125
cli_provider_urls: Dict[str, str] = {}
125126
if vllm_url:
@@ -166,12 +167,16 @@ def serve(
166167
)
167168

168169
except KeyboardInterrupt:
170+
click.echo("in keyboard")
169171
if logger:
170172
logger.info("Shutting down server")
171173
except ConfigurationError as e:
174+
click.echo("in config error")
172175
click.echo(f"Configuration error: {e}", err=True)
173176
sys.exit(1)
174177
except Exception as e:
178+
click.echo("exception is")
179+
click.echo(e)
175180
if logger:
176181
logger.exception("Unexpected error occurred")
177182
click.echo(f"Error: {e}", err=True)

src/codegate/storage/storage_engine.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,22 @@ def __init__(self, data_path='./weaviate_data'):
3939
self.schema_config = schema_config
4040

4141
# setup schema for weaviate
42+
print("before get client")
4243
weaviate_client = self.get_client(self.data_path)
44+
print("after get client")
4345
if weaviate_client is not None:
4446
try:
47+
print("before connect")
4548
weaviate_client.connect()
49+
print("before setup schema")
4650
self.setup_schema(weaviate_client)
51+
print("after setup schema")
52+
except Exception as e:
53+
self.__logger.error(f"Failed to connect or setup schema: {str(e)}")
4754
finally:
55+
print("before close")
4856
weaviate_client.close()
57+
print("after close")
4958
else:
5059
self.__logger.error("Could not find client, skipping schema setup.")
5160

0 commit comments

Comments
 (0)