Skip to content

Commit 46f4636

Browse files
CodingAnarchyclaude
andcommitted
Add comprehensive CHANGELOG.md documenting all releases
Documents the complete version history of Hammerwork: - v0.2.1: Remove "full" feature for cleaner database backend selection - v0.2.0: Major release with statistics tracking and dead job management - v0.1.0: Initial release with core job queue functionality The changelog follows Keep a Changelog format and provides detailed information about features, changes, and technical improvements across all versions for better project maintenance and user understanding. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 9e580a4 commit 46f4636

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed

CHANGELOG.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.2.1] - 2025-06-25
9+
10+
### Removed
11+
- Removed the `full` feature flag that enabled both PostgreSQL and MySQL simultaneously
12+
- Users typically choose one database backend per application
13+
- Simplifies the feature set and reduces unnecessary dependencies
14+
- Available features are now: `postgres`, `mysql`
15+
16+
## [0.2.0] - 2025-06-25
17+
18+
### Added
19+
- **Comprehensive Statistics Tracking**
20+
- `JobStatistics` struct with detailed metrics (throughput, processing times, error rates)
21+
- `StatisticsCollector` trait for pluggable statistics backends
22+
- `InMemoryStatsCollector` with time-windowed data collection and configurable cleanup
23+
- `QueueStats` for queue-specific insights
24+
- `DeadJobSummary` for dead job analysis with error patterns
25+
- `JobEvent` system for tracking job processing lifecycle events
26+
- Integration with `Worker` and `WorkerPool` for automatic statistics collection
27+
28+
- **Dead Job Management**
29+
- Enhanced `Job` struct with `failed_at` field and `Dead` status
30+
- Dead job utility methods: `is_dead()`, `has_exhausted_retries()`, `age()`, `processing_duration()`
31+
- Database operations for dead job management:
32+
- `mark_job_dead()` - Mark jobs as permanently failed
33+
- `get_dead_jobs()` - Retrieve dead jobs with pagination
34+
- `get_dead_jobs_by_queue()` - Queue-specific dead job retrieval
35+
- `retry_dead_job()` - Reset dead jobs for retry
36+
- `purge_dead_jobs()` - Clean up old dead jobs
37+
- `get_dead_job_summary()` - Summary statistics with error patterns
38+
39+
- **Database Enhancements**
40+
- Extended `DatabaseQueue` trait with 15 new methods for statistics and dead job management
41+
- Enhanced database schemas with `failed_at` column and performance indexes
42+
- Complete feature parity between PostgreSQL and MySQL implementations
43+
- Optimized queries with proper indexing for performance
44+
45+
- **Testing & Examples**
46+
- 32 comprehensive unit tests with full coverage of new features
47+
- Updated examples demonstrating statistics collection and dead job management
48+
- Enhanced integration tests with 4 new test scenarios:
49+
- Dead job management lifecycle
50+
- Statistics collection functionality
51+
- Database queue statistics
52+
- Error frequency analysis
53+
54+
### Changed
55+
- Updated package description to highlight new statistics and dead job management features
56+
- Enhanced API with backward-compatible design
57+
58+
## [0.1.0] - 2025-06-25
59+
60+
### Added
61+
- **Core Job Queue Infrastructure**
62+
- `Job` struct with UUID, payload, status, retry logic, and scheduling
63+
- Job statuses: `Pending`, `Running`, `Completed`, `Failed`, `Retrying`
64+
- Support for delayed job execution with configurable retry attempts
65+
- `JobQueue<DB>` generic struct with database connection pooling
66+
67+
- **Worker System**
68+
- `Worker<DB>` for processing jobs from specific queues
69+
- Configurable polling intervals, retry delays, and maximum retries
70+
- `WorkerPool<DB>` for managing multiple workers with graceful shutdown
71+
- Async channels for coordinated shutdown signaling
72+
73+
- **Database Support**
74+
- `DatabaseQueue` trait defining interface for database operations
75+
- Full PostgreSQL implementation with `FOR UPDATE SKIP LOCKED` for efficient job polling
76+
- Full MySQL implementation with transaction-based locking
77+
- Database-agnostic design using SQLx for compile-time query verification
78+
79+
- **Error Handling & Observability**
80+
- `HammerworkError` enum with structured error handling using `thiserror`
81+
- Comprehensive error wrapping for SQLx, serialization, and custom errors
82+
- Integrated tracing support for observability
83+
84+
- **Database Schema**
85+
- Optimized `hammerwork_jobs` table design for both PostgreSQL and MySQL
86+
- Proper indexing for efficient queue polling and job management
87+
- JSON/JSONB payload support with metadata tracking
88+
89+
- **Testing & Integration**
90+
- Comprehensive Docker-based integration testing infrastructure
91+
- Support for both PostgreSQL and MySQL in CI/CD pipelines
92+
- Shared test scenarios for database-agnostic testing
93+
- Complete test coverage with realistic job processing scenarios
94+
95+
- **Configuration & Features**
96+
- Feature flags: `postgres`, `mysql` for selective database support
97+
- Workspace configuration for consistent dependency management
98+
- Production-ready configuration with performance optimizations
99+
100+
### Technical Details
101+
- Built on Tokio with async/await throughout the codebase
102+
- Uses database transactions for atomic job state changes
103+
- Type-safe job handling with `Result<()>` error propagation
104+
- SQLx for compile-time query checking and database abstraction
105+
- Generic over database types using `sqlx::Database` trait
106+
107+
---
108+
109+
## Release Links
110+
- [0.2.1](https://github.com/CodingAnarchy/hammerwork/releases/tag/v0.2.1)
111+
- [0.2.0](https://github.com/CodingAnarchy/hammerwork/releases/tag/v0.2.0)
112+
- [0.1.0](https://github.com/CodingAnarchy/hammerwork/releases/tag/v0.1.0)
113+
114+
## Contributing
115+
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
116+
117+
## License
118+
This project is licensed under the MIT License - see the [LICENSE-MIT](LICENSE-MIT) file for details.

0 commit comments

Comments
 (0)