Fix Docker runtime errors: migrate to google-genai SDK and fix SQLite permissions
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
Migrate from deprecated google-generativeai to google-genai (>=1.0) using the new Client-based API, and fix SQLite "unable to open database file" in Docker by chowning the data directory to appuser before switching users. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,11 +4,14 @@ from __future__ import annotations
|
||||
|
||||
import sqlite3
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
|
||||
def init_db(db_path: str) -> sqlite3.Connection:
|
||||
"""Initialize the trade logs database and return a connection."""
|
||||
if db_path != ":memory:":
|
||||
Path(db_path).parent.mkdir(parents=True, exist_ok=True)
|
||||
conn = sqlite3.connect(db_path)
|
||||
conn.execute(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user