From f8dae7de9d38535ba1815afd08c25e21bc3dae52 Mon Sep 17 00:00:00 2001 From: Pavel Mikhalkevich Date: Sat, 17 Feb 2024 22:37:50 +0500 Subject: [PATCH] Update docs --- src/proto/batch/mod.rs | 8 +++++--- src/proto/mod.rs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/proto/batch/mod.rs b/src/proto/batch/mod.rs index 503b5260..cd1134e1 100644 --- a/src/proto/batch/mod.rs +++ b/src/proto/batch/mod.rs @@ -28,7 +28,7 @@ pub use cmd::{CommitBatch, GetBatchStatus, OpenBatch}; /// Here is how you can create a simple batch: /// ```no_run /// # use faktory::Error; -/// use faktory::{Producer, Job, Batch}; +/// use faktory::{Producer, Job, ent::Batch}; /// /// let mut prod = Producer::connect(None)?; /// let job1 = Job::builder("job_type").build(); @@ -49,7 +49,8 @@ pub use cmd::{CommitBatch, GetBatchStatus, OpenBatch}; /// /// Nested batches are also supported: /// ```no_run -/// # use faktory::{Producer, Job, Batch, Error}; +/// # use faktory::{Producer, Job, Error}; +/// # use faktory::ent::Batch; /// # let mut prod = Producer::connect(None)?; /// let parent_job1 = Job::builder("job_type").build(); /// let parent_job2 = Job::builder("another_job_type").build(); @@ -86,7 +87,8 @@ pub use cmd::{CommitBatch, GetBatchStatus, OpenBatch}; /// You can retieve the batch status using a [`Client`]: /// ```no_run /// # use faktory::Error; -/// # use faktory::{Producer, Job, Batch, Client, CallbackState}; +/// # use faktory::{Producer, Job, Client}; +/// # use faktory::ent::{Batch, CallbackState}; /// let mut prod = Producer::connect(None)?; /// let job = Job::builder("job_type").build(); /// let cb_job = Job::builder("callback_job_type").build(); diff --git a/src/proto/mod.rs b/src/proto/mod.rs index 42e5d088..67bc9fdb 100644 --- a/src/proto/mod.rs +++ b/src/proto/mod.rs @@ -130,7 +130,7 @@ impl Default for ClientOptions { /// /// Fetching a job's execution progress: /// ```no_run -/// use faktory::{Client, JobState}; +/// use faktory::{Client, ent::JobState}; /// let job_id = String::from("W8qyVle9vXzUWQOf"); /// let mut cl = Client::connect(None)?; /// if let Some(progress) = cl.get_progress(job_id)? { @@ -146,7 +146,7 @@ impl Default for ClientOptions { /// Sending an update on a job's execution progress: /// /// ```no_run -/// use faktory::{Client, ProgressUpdateBuilder}; +/// use faktory::{Client, ent::ProgressUpdateBuilder}; /// let jid = String::from("W8qyVle9vXzUWQOf"); /// let mut cl = Client::connect(None)?; /// let progress = ProgressUpdateBuilder::new(&jid)