Streamlit/better UI#79
Conversation
- Updated version and description in telegram.yaml for event extraction related to TON/crypto channels. - Added critical scope filters for event extraction, including security incidents, competitor updates, and regulatory changes. - Enhanced general extraction rules and title slot extraction guidelines. - Modified docker-compose.yml to allow customization of Telegram session file path via environment variable. - Updated telegram_qr_auth.py to use the customizable session file path and ensure the directory exists. - Adjusted SQL queries in both Postgres and SQLite repositories to include 'extracted_at' in date range checks for event retrieval.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| SELECT * FROM events | ||
| WHERE COALESCE(actual_start, actual_end, planned_start, planned_end) >= %s | ||
| AND COALESCE(actual_start, actual_end, planned_start, planned_end) <= %s | ||
| ORDER BY COALESCE(actual_start, actual_end, planned_start, planned_end) DESC | ||
| WHERE COALESCE(actual_start, actual_end, planned_start, planned_end, message_published_at, extracted_at) >= %s | ||
| AND COALESCE(actual_start, actual_end, planned_start, planned_end, message_published_at, extracted_at) <= %s | ||
| ORDER BY COALESCE(actual_start, actual_end, planned_start, planned_end, message_published_at, extracted_at) DESC |
There was a problem hiding this comment.
Add Postgres migration for message_published_at
The Postgres query for fetching events now filters and orders on message_published_at, but there is no matching schema change for Postgres (only SQLite was altered to add this column). With the current database definition the events table lacks message_published_at, so Postgres deployments will start failing with column "message_published_at" does not exist as soon as get_events_in_window or the bulk upsert path references it. Please add a migration/DDL update for Postgres to create this column before using it.
Useful? React with 👍 / 👎.
No description provided.