superbrain-server
Advanced tools
+1
-1
| { | ||
| "name": "superbrain-server", | ||
| "version": "1.0.58", | ||
| "version": "1.0.59", | ||
| "description": "1-Line Auto-Installer and Server Execution wrapper for SuperBrain", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -249,4 +249,4 @@ #!/usr/bin/env python3 | ||
| def get_recent(self, limit=10): | ||
| """Return the most recently analysed posts (excludes soft-deleted).""" | ||
| def get_recent(self, limit=10000): | ||
| """Return the most recently analysed posts (excludes soft-deleted). Optimized to exclude heavy text blobs.""" | ||
| if not self.is_connected(): | ||
@@ -256,4 +256,5 @@ return [] | ||
| cur = self._conn.cursor() | ||
| cols = "shortcode, url, username, content_type, analyzed_at, updated_at, post_date, likes, thumbnail, title, summary, tags, music, category, is_hidden" | ||
| cur.execute( | ||
| "SELECT * FROM analyses WHERE (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", (limit,) | ||
| f"SELECT {cols} FROM analyses WHERE (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", (limit,) | ||
| ) | ||
@@ -271,4 +272,5 @@ return [self._row_to_dict(r) for r in cur.fetchall()] | ||
| cur = self._conn.cursor() | ||
| cols = "shortcode, url, username, content_type, analyzed_at, updated_at, post_date, likes, thumbnail, title, summary, tags, music, category, is_hidden" | ||
| cur.execute( | ||
| "SELECT * FROM analyses WHERE category = ? AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", | ||
| f"SELECT {cols} FROM analyses WHERE category = ? AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", | ||
| (category, limit) | ||
@@ -298,4 +300,5 @@ ) | ||
| params = [f"%{t.lower()}%" for t in tags] + [limit] | ||
| cols = "shortcode, url, username, content_type, analyzed_at, updated_at, post_date, likes, thumbnail, title, summary, tags, music, category, is_hidden" | ||
| cur.execute( | ||
| f"SELECT * FROM analyses WHERE ({conditions}) AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", | ||
| f"SELECT {cols} FROM analyses WHERE ({conditions}) AND (is_hidden IS NULL OR is_hidden = 0) ORDER BY analyzed_at DESC LIMIT ?", | ||
| params | ||
@@ -302,0 +305,0 @@ ) |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
513543
0.11%11041
0.03%