📚 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:
@@ -1,16 +1,24 @@
|
||||
[package]
|
||||
name = "paracas-daemon"
|
||||
description = "Background job management for paracas tick data downloader"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Background job management for paracas tick data downloader"
|
||||
documentation.workspace = true
|
||||
authors.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -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.
|
||||
@@ -11,6 +11,7 @@
|
||||
//! - [`DaemonSpawner`] - Spawns detached daemon processes for background downloads
|
||||
//! - [`DaemonProgress`] - Thread-safe progress tracking for daemon jobs
|
||||
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![doc(issue_tracker_base_url = "https://github.com/factordynamics/paracas/issues/")]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
Reference in New Issue
Block a user