Commit 4de5480
fix: batch optimization stage 1 (#80)
* Feat: Implement batch processing and optimized article insertion for RSS fetching
* perf: increase feed batch size and add queue implementation plan
- Increase maxFeedsPerBatch from 20 to 100 for faster rotation
- With 1-minute cron frequency, this processes 6,000 feeds/hour
- Add comprehensive queue-based architecture plan for Phase 3
- Plan includes runtime abstraction for both Cloudflare and Docker
- Supports scaling from 2K to 50K+ feeds with <5min freshness
Queue plan features:
- Cloudflare Queues for Workers deployment
- BullMQ (Redis) for Docker deployment
- In-memory fallback for development
- Graceful degradation when queue unavailable
- Cost projections and migration strategy included
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: format
* fix: address Sentry bug and ESLint errors
Critical fixes:
- Use .limit() server-side instead of loading all feeds into memory
This prevents memory pressure (e.g., 25MB for 50K feeds) and scales better
- Add separate lightweight query for total count (only fetches IDs)
- Fix ESLint error: add proper type assertion for D1 batch statements
Technical details:
- Changed from allSources.slice() to db.select().limit()
- Added comment explaining Drizzle/D1 type mismatch
- Formatted queue implementation plan with Prettier
Note: Existing type errors with inArray() remain unfixed (pre-existing issue)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: resolve type errors from batch optimization commit
The batch optimization commit (913b220) introduced type errors by using
.select() with field specifications, which breaks Drizzle ORM's type
inference for inArray().
Fixes:
- Line 205: Changed .select({ plan }) back to .select()
- Line 560: Changed .select({ guid }) back to .select()
- Line 92: Changed .select({ id }) back to .select()
Root cause: Drizzle's inArray() requires full table selection for proper
type inference. Using partial field selection breaks the type chain.
Confirmed: main branch has no type errors, errors were introduced in 913b220
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: format
* chore: simplify format scripts in monorepo
Replace complex multi-package format scripts with single prettier
command that formats entire repository in one pass.
Before:
- format:root for root files
- Separate format commands for each package
- 4 total script definitions
After:
- Single `prettier --write .` command
- Leverages .prettierignore for exclusions
- Simpler, faster, and more maintainable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: format all files with prettier
Run prettier across entire codebase to fix trailing newlines,
line wrapping, and formatting inconsistencies.
Changes include:
- Remove trailing newlines from config files
- Fix line wrapping in markdown documentation
- Standardize formatting in YAML workflow files
- Reformat JSON snapshot files
- Apply consistent code formatting across packages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: format
---------
Co-authored-by: seer-by-sentry[bot] <157164994+seer-by-sentry[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 32ec3c9 commit 4de5480
File tree
46 files changed
+2354
-2254
lines changed- .github
- ISSUE_TEMPLATE
- actions
- get-worker-name
- setup
- substitute-d1-database-id
- workflows
- docs/planning
- packages
- api
- drizzle/meta
- scripts
- src
- auth
- entries
- hono
- routers
- services
- email-templates
- test
- app/src
- components/ui
- lib/hooks/__tests__
- tricorder
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+2354
-2254
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
| |||
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
98 | | - | |
| 109 | + | |
99 | 110 | | |
100 | 111 | | |
101 | 112 | | |
| |||
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
117 | | - | |
| 128 | + | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
| |||
148 | 159 | | |
149 | 160 | | |
150 | 161 | | |
| 162 | + | |
151 | 163 | | |
152 | 164 | | |
153 | 165 | | |
154 | | - | |
| |||
0 commit comments