Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Feb 17, 2024
1 parent 65ac269 commit f8dae7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/proto/batch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)? {
Expand All @@ -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)
Expand Down

0 comments on commit f8dae7d

Please sign in to comment.