Skip to content

Commit a6490ad

Browse files
CodingAnarchyclaude
andcommitted
chore: Release version 1.1.0
This release includes significant new features and important bug fixes: ### Added - Comprehensive CLI workflow management with complete command suite - Enhanced job dependencies and workflow features - Full implementation of all cargo-hammerwork commands - Visual workflow dependency graphs (text, DOT, Mermaid, JSON) ### Fixed - Workflow dependencies storage in PostgreSQL and MySQL - All 26 failing doc tests - Test isolation issues causing intermittent failures - Various code quality improvements ### Enhanced - Complete documentation updates for both README files - Professional CLI output formatting - Comprehensive command documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 485a264 commit a6490ad

File tree

4 files changed

+171
-32
lines changed

4 files changed

+171
-32
lines changed

CHANGELOG.md

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [1.1.0] - 2025-06-29
99

1010
### Added
1111
- **🎨 Comprehensive CLI Workflow Management**
@@ -21,24 +21,58 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
- Workflow metadata support with JSON configuration and validation
2222
- Advanced dependency tree traversal and visualization algorithms
2323
- Professional status color coding for completed, failed, running, and pending jobs
24+
- `depends_on()` and `depends_on_jobs()` builder methods for job dependencies
25+
- `with_workflow()` method to associate jobs with workflows
26+
27+
- **🛠️ Comprehensive CLI Architecture**
28+
- Full implementation of all cargo-hammerwork commands:
29+
- Job management (list, show, enqueue, retry, cancel, delete)
30+
- Worker control (start, stop, status, restart)
31+
- Queue operations (list, stats, clear, pause, resume)
32+
- Monitoring (dashboard, health, metrics, logs)
33+
- Batch operations (create, status, retry, cancel)
34+
- Cron scheduling (list, add, remove, enable, disable)
35+
- Database maintenance (cleanup, vacuum, analyze, health)
36+
- Backup & restore (create, restore, list, verify)
37+
- Modular command structure with dedicated modules for each feature area
38+
- Professional table formatting and display utilities
39+
- Comprehensive error handling and validation
40+
41+
### Fixed
42+
- **🐛 Workflow Dependencies Storage**
43+
- Fixed PostgreSQL and MySQL `enqueue` methods to properly store workflow fields (`depends_on`, `dependents`, `dependency_status`, `workflow_id`, `workflow_name`)
44+
- Corrected `dependency_status` serialization to use `.as_str()` instead of JSON serialization to match database constraints
45+
- Jobs with dependencies are now correctly stored and retrieved from the database
46+
47+
- **📚 Documentation Tests**
48+
- Fixed all 26 failing doc tests by correcting Duration API usage (`from_minutes``from_secs`)
49+
- Added missing async contexts to doc test examples
50+
- Added missing `DatabaseQueue` trait imports where needed
51+
- Removed references to deprecated `create_tables()` method
52+
53+
- **🧪 Test Isolation**
54+
- Improved test isolation by using unique queue names with UUIDs to prevent intermittent failures
55+
- Fixed test race conditions in workflow dependency tests
56+
57+
- **🧹 Code Quality Improvements**
58+
- Removed unused imports in migration modules (postgres.rs, mysql.rs)
59+
- Fixed unused variable warnings in examples
60+
- Cleaned up compilation warnings across the codebase
2461

2562
### Enhanced
26-
- **📖 Documentation Improvements**
27-
- Updated README.md with comprehensive workflow examples and job dependency documentation
63+
- **📖 Documentation Updates**
64+
- Updated main README with comprehensive workflow examples and job dependency documentation
2865
- Enhanced ROADMAP.md marking job dependencies and workflows as completed features
2966
- Added workflow documentation section with pipeline examples and synchronization barriers
30-
31-
### Fixed
32-
- **🧹 Code Quality Improvements**
33-
- Removed unused imports in CLI command test modules (config.rs, migration.rs)
34-
- Cleaned up compilation warnings and improved code organization
35-
- Enhanced CLI command module structure with proper workflow integration
67+
- Updated cargo-hammerwork README with complete command documentation for all features
68+
- Added complete command documentation for job, worker, queue, monitor, batch, cron, maintenance, workflow, and backup commands
69+
- Updated feature lists to accurately reflect all implemented functionality
3670

3771
### Technical Implementation
38-
- **CLI Architecture**: Comprehensive workflow command structure with database integration
72+
- **CLI Architecture**: Comprehensive command structure with database integration for all operations
3973
- **Visualization**: Multi-format graph output (text, DOT, Mermaid, JSON) for diverse integration needs
4074
- **Dependencies**: Complete dependency graph algorithms with cycle detection and level calculation
41-
- **Professional Output**: Bootstrap-inspired color schemes and professional formatting for workflow visualization
75+
- **Professional Output**: Bootstrap-inspired color schemes and professional formatting for all CLI output
4276

4377
## [1.0.0] - 2025-06-27
4478

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
resolver = "2"
99

1010
[workspace.package]
11-
version = "1.0.0"
11+
version = "1.1.0"
1212
edition = "2024"
1313
license = "MIT"
1414
repository = "https://github.com/CodingAnarchy/hammerwork"

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ See the [Quick Start Guide](docs/quick-start.md) for complete examples with Post
5353
## Basic Example
5454

5555
```rust
56-
use hammerwork::{Job, Worker, WorkerPool, JobQueue, RetryStrategy};
56+
use hammerwork::{Job, Worker, WorkerPool, JobQueue, RetryStrategy, queue::DatabaseQueue};
5757
use serde_json::json;
5858
use std::{sync::Arc, time::Duration};
5959

@@ -84,7 +84,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
8484
.with_exponential_backoff(
8585
Duration::from_secs(2),
8686
2.0,
87-
Duration::from_minutes(10)
87+
Duration::from_secs(10 * 60)
8888
);
8989
queue.enqueue(job).await?;
9090

@@ -97,7 +97,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
9797
Create complex data processing pipelines with job dependencies:
9898

9999
```rust
100-
use hammerwork::{Job, JobGroup, DependencyStatus, FailurePolicy};
100+
use hammerwork::{Job, JobGroup, FailurePolicy, queue::DatabaseQueue};
101101
use serde_json::json;
102102

103103
// Sequential pipeline: job1 → job2 → job3
@@ -193,6 +193,7 @@ Working examples in `examples/`:
193193
- `worker_batch_example.rs` - Worker batch processing features
194194
- `retry_strategies.rs` - Advanced retry patterns with exponential backoff and jitter
195195
- `result_storage_example.rs` - Job result storage and retrieval
196+
- `autoscaling_example.rs` - Dynamic worker pool scaling based on queue depth
196197

197198
```bash
198199
cargo run --example postgres_example --features postgres

cargo-hammerwork/README.md

Lines changed: 121 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ cargo-hammerwork provides a modern, modular CLI for managing Hammerwork-based ap
2222
- ⚙️ **Configuration Management** - Centralized config with file and environment support
2323
- 🧩 **Modular Architecture** - Clean separation of concerns with dedicated command modules
2424
- 🐘 **Multi-Database Support** - PostgreSQL and MySQL compatibility
25-
- 📊 **Advanced Monitoring** - Real-time dashboards and health checks (framework included)
26-
- 👷 **Worker Management** - Control job processing workers (framework included)
27-
- 🎯 **Queue Operations** - Comprehensive queue management (framework included)
28-
- 📋 **Job Management** - Full job lifecycle control (framework included)
25+
- 📊 **Advanced Monitoring** - Real-time dashboards and health checks
26+
- 👷 **Worker Management** - Control job processing workers and pools
27+
- 🎯 **Queue Operations** - Comprehensive queue management and statistics
28+
- 📋 **Job Management** - Full job lifecycle control and management
29+
- 📦 **Batch Operations** - Bulk job processing and management
30+
-**Cron Management** - Recurring job scheduling and management
31+
- 🔧 **Database Maintenance** - Cleanup, optimization, and health checks
32+
- 🔄 **Workflow Management** - Job dependencies and complex pipelines
33+
- 💾 **Backup & Restore** - Database backup and recovery operations
2934

3035
## Quick Start
3136

@@ -70,10 +75,104 @@ cargo hammerwork migration status [--database-url URL]
7075
```bash
7176
# Configuration management
7277
cargo hammerwork config show # View all settings
73-
cargo hammerwork config set <key> <value> # Set a configuration value
74-
cargo hammerwork config get <key> # Get a specific value
75-
cargo hammerwork config reset --confirm # Reset to defaults
76-
cargo hammerwork config path # Show config file location
78+
cargo hammerwork config set <key> <value> # Set a configuration value
79+
cargo hammerwork config get <key> # Get a specific value
80+
cargo hammerwork config reset --confirm # Reset to defaults
81+
cargo hammerwork config path # Show config file location
82+
```
83+
84+
### Job Management Commands
85+
86+
```bash
87+
# Job lifecycle management
88+
cargo hammerwork job list [--queue QUEUE] [--status STATUS] [--limit N]
89+
cargo hammerwork job show <JOB_ID> # Detailed job information
90+
cargo hammerwork job enqueue --queue QUEUE --payload JSON [OPTIONS]
91+
cargo hammerwork job retry <JOB_ID> # Retry a failed job
92+
cargo hammerwork job cancel <JOB_ID> # Cancel a pending job
93+
cargo hammerwork job delete <JOB_ID> # Remove a job
94+
```
95+
96+
### Worker Management Commands
97+
98+
```bash
99+
# Worker control and monitoring
100+
cargo hammerwork worker start [--queue QUEUE] [--workers N]
101+
cargo hammerwork worker stop [--queue QUEUE] # Graceful shutdown
102+
cargo hammerwork worker status [--queue QUEUE] # Worker pool status
103+
cargo hammerwork worker restart [--queue QUEUE] # Restart workers
104+
```
105+
106+
### Queue Management Commands
107+
108+
```bash
109+
# Queue operations and statistics
110+
cargo hammerwork queue list # List all queues
111+
cargo hammerwork queue stats [--queue QUEUE] # Queue statistics
112+
cargo hammerwork queue clear --queue QUEUE # Clear all jobs
113+
cargo hammerwork queue pause --queue QUEUE # Pause processing
114+
cargo hammerwork queue resume --queue QUEUE # Resume processing
115+
```
116+
117+
### Monitoring Commands
118+
119+
```bash
120+
# Real-time monitoring and health checks
121+
cargo hammerwork monitor dashboard # Live dashboard
122+
cargo hammerwork monitor health [--format json] # System health check
123+
cargo hammerwork monitor metrics [--period 1h] # Performance metrics
124+
cargo hammerwork monitor logs [--tail] # Log streaming
125+
```
126+
127+
### Batch Operation Commands
128+
129+
```bash
130+
# Bulk job operations
131+
cargo hammerwork batch create --jobs FILE # Create job batch
132+
cargo hammerwork batch status <BATCH_ID> # Batch progress
133+
cargo hammerwork batch retry <BATCH_ID> # Retry failed jobs
134+
cargo hammerwork batch cancel <BATCH_ID> # Cancel batch
135+
```
136+
137+
### Cron Management Commands
138+
139+
```bash
140+
# Recurring job scheduling
141+
cargo hammerwork cron list # List cron jobs
142+
cargo hammerwork cron add --schedule "0 */6 * * *" --queue QUEUE --payload JSON
143+
cargo hammerwork cron remove <JOB_ID> # Remove cron job
144+
cargo hammerwork cron enable <JOB_ID> # Enable scheduling
145+
cargo hammerwork cron disable <JOB_ID> # Disable scheduling
146+
```
147+
148+
### Maintenance Commands
149+
150+
```bash
151+
# Database maintenance and optimization
152+
cargo hammerwork maintenance cleanup # Remove old completed jobs
153+
cargo hammerwork maintenance vacuum # Optimize database
154+
cargo hammerwork maintenance analyze # Update table statistics
155+
cargo hammerwork maintenance health # Database health check
156+
```
157+
158+
### Workflow Commands
159+
160+
```bash
161+
# Job dependencies and complex pipelines
162+
cargo hammerwork workflow create --file WORKFLOW.json
163+
cargo hammerwork workflow list # List active workflows
164+
cargo hammerwork workflow status <WORKFLOW_ID> # Workflow progress
165+
cargo hammerwork workflow cancel <WORKFLOW_ID> # Cancel workflow
166+
```
167+
168+
### Backup Commands
169+
170+
```bash
171+
# Database backup and recovery
172+
cargo hammerwork backup create --output FILE # Create backup
173+
cargo hammerwork backup restore --input FILE # Restore from backup
174+
cargo hammerwork backup list # List available backups
175+
cargo hammerwork backup verify --input FILE # Verify backup integrity
77176
```
78177

79178
## Architecture & Design
@@ -99,34 +198,39 @@ cargo-hammerwork/
99198
│ └── main.rs # CLI entry point
100199
```
101200

102-
### Framework Extensions (Implemented but Not Exposed)
201+
### Command Feature Highlights
103202

104-
The codebase includes comprehensive implementations for advanced features that provide a solid foundation for extending the CLI:
105-
106-
#### Job Management Framework
203+
#### Job Management
107204
- List jobs with advanced filtering (queue, status, priority, time-based)
108205
- Job enqueueing with priority, delays, timeouts, and retry configuration
109206
- Bulk operations (retry, cancel, purge) with safety confirmations
110207
- Detailed job inspection with full lifecycle tracking
111208

112-
#### Queue Management Framework
209+
#### Queue Management
113210
- Queue listing with comprehensive statistics
114211
- Queue operations (clear, pause, resume)
115212
- Health monitoring with configurable thresholds
116213
- Detailed vs. summary statistics views
117214

118-
#### Worker Management Framework
215+
#### Worker Management
119216
- Worker lifecycle control (start, stop, status)
120217
- Configurable worker pools with priority handling
121218
- Real-time worker monitoring and metrics
122219
- Graceful shutdown and resource management
123220

124-
#### Monitoring & Observability Framework
221+
#### Monitoring & Observability
125222
- Real-time dashboard with auto-refresh
126223
- System health checks with JSON/table output
127224
- Performance metrics with configurable time periods
128225
- Log tailing and filtering capabilities
129226

227+
#### Advanced Features
228+
- **Batch Operations**: Bulk job processing with progress tracking
229+
- **Cron Scheduling**: Time-based recurring job management
230+
- **Database Maintenance**: Cleanup, optimization, and health monitoring
231+
- **Workflow Management**: Complex job dependency orchestration
232+
- **Backup & Restore**: Complete database backup and recovery
233+
130234
### Configuration System
131235

132236
Supports multiple configuration sources with proper precedence:
@@ -320,11 +424,11 @@ cargo hammerwork migration status
320424

321425
Planned enhancements include:
322426

323-
- **Job Scheduling**: Advanced cron-based job scheduling
324-
- **Metrics Export**: Prometheus/OpenTelemetry integration
325427
- **Web Dashboard**: Browser-based monitoring interface
326428
- **Cluster Management**: Multi-node coordination features
327429
- **Plugin System**: Extensible plugin architecture
430+
- **Advanced Analytics**: Historical performance analysis and trending
431+
- **External Integrations**: Webhook notifications and third-party service integration
328432

329433
## License
330434

0 commit comments

Comments
 (0)