📚 docs: add missing READMEs and align crates with Rust rules
- Create README.md for paracas-daemon and paracas-estimate
- Add #![doc = include_str!("../README.md")] to daemon/estimate lib.rs
- Add missing Cargo.toml metadata (docs.rs, authors, keywords, categories)
- Reorder workspace dependencies by line length per style guide
- Document background jobs, download-all, status, and job commands
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# paracas-daemon
|
||||
|
||||
Background job management for the paracas tick data downloader.
|
||||
|
||||
## Features
|
||||
|
||||
- Job tracking with unique identifiers
|
||||
- Persistent state storage
|
||||
- Detached daemon process spawning
|
||||
- Thread-safe progress tracking
|
||||
|
||||
## Types
|
||||
|
||||
- `JobId` - Unique identifier for download jobs
|
||||
- `JobStatus` - Current status of a job (pending, running, completed, failed)
|
||||
- `InstrumentTask` - Download task for a single instrument
|
||||
- `DownloadJob` - Complete download job with multiple tasks
|
||||
- `StateManager` - Persistent state storage and retrieval
|
||||
- `DaemonSpawner` - Spawns detached daemon processes
|
||||
- `DaemonProgress` - Thread-safe progress tracking
|
||||
|
||||
## Usage
|
||||
|
||||
```rust,ignore
|
||||
use paracas_daemon::{StateManager, DownloadJob, JobId, JobStatus};
|
||||
|
||||
// Create a state manager
|
||||
let manager = StateManager::new()?;
|
||||
|
||||
// Create a new job
|
||||
let job = DownloadJob::new(tasks);
|
||||
manager.save_job(&job)?;
|
||||
|
||||
// Retrieve job status
|
||||
if let Some(job) = manager.get_job(&job.id)? {
|
||||
println!("Job status: {:?}", job.status());
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see [LICENSE](../../LICENSE) for details.
|
||||
Reference in New Issue
Block a user