Commit eb4d256
fix: Resolve compilation issues and add comprehensive TestQueue documentation
## Examples Compilation Fixes
- Add missing example configurations in Cargo.toml with proper feature requirements
- Fix database pool setup with conditional compilation in autoscaling_example.rs
- Replace generic function signatures with concrete types using type aliases in retry_strategies.rs
- Fix job priority methods (.with_priority() instead of .as_high())
- Fix batch creation using .with_jobs() builder pattern
- Fix workflow creation using .add_job() chain and .depends_on() for dependencies
- Fix cron expressions to use 6-field format (including seconds)
- Fix field access for QueueStats (use .statistics.completed instead of .completed)
- Remove Worker usage from TestQueue example with proper documentation of incompatibility
## TestQueue Documentation & Testing
- Add comprehensive docs/testing.md with complete TestQueue usage guide
- Document TestQueue limitations: designed for testing job logic, not Worker functionality
- Add extensive examples for delayed jobs, cron jobs, priorities, batches, workflows
- Fix test_cron_job test failure by advancing MockClock before dequeuing cron jobs
- Add TestQueue feature to README with examples and documentation links
## Key Features Added
- Complete TestQueue documentation with 400+ lines of usage examples
- Clear separation of concerns: TestQueue for job logic, real databases for Worker testing
- Best practices guide for effective TestQueue usage in unit tests
- All 187 unit tests, 150 doctests, and integration tests now passing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 308389c commit eb4d256
File tree
7 files changed
+1414
-133
lines changed- docs
- examples
- src/queue
7 files changed
+1414
-133
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
233 | 278 | | |
234 | 279 | | |
235 | 280 | | |
| |||
0 commit comments