Skip to content

Commit

Permalink
Use doc-cfg for new ent features
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Jan 20, 2024
1 parent 030484f commit f3c8348
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ pub use crate::proto::Reconnect;
pub use crate::proto::{Job, JobBuilder};

#[cfg(feature = "ent")]
pub use crate::proto::{Batch, BatchBuilder, BatchStatus};
#[cfg_attr(docsrs, doc(cfg(feature = "ent")))]
pub use crate::proto::{
Batch, BatchBuilder, BatchStatus, Progress, ProgressUpdate, ProgressUpdateBuilder,
};
#[cfg(feature = "ent")]
mod tracker;
#[cfg(feature = "ent")]
pub use crate::proto::{Progress, ProgressUpdate, ProgressUpdateBuilder};
#[cfg(feature = "ent")]
#[cfg_attr(docsrs, doc(cfg(feature = "ent")))]
pub use crate::tracker::Tracker;
5 changes: 3 additions & 2 deletions src/proto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ pub use self::single::{
gen_random_wid, Ack, Fail, Heartbeat, Info, Job, JobBuilder, Push, QueueAction, QueueControl,
};

#[cfg(feature = "ent")]
mod batch;
#[cfg(feature = "ent")]
pub use self::single::ent::{Progress, ProgressUpdate, ProgressUpdateBuilder, Track};

#[cfg(feature = "ent")]
mod batch;
#[cfg(feature = "ent")]
pub use batch::{
Batch, BatchBuilder, BatchHandle, BatchStatus, CommitBatch, GetBatchStatus, OpenBatch,
Expand Down
4 changes: 2 additions & 2 deletions src/proto/single/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ mod utils;

#[cfg(feature = "ent")]
#[cfg_attr(docsrs, doc(cfg(feature = "ent")))]
mod ent;
pub mod ent;

use crate::error::Error;

pub use self::cmd::*;
pub use self::resp::*;
pub use self::utils::{gen_random_jid, gen_random_wid};
pub use self::utils::gen_random_wid;

const JOB_DEFAULT_QUEUE: &str = "default";
const JOB_DEFAULT_RESERVED_FOR_SECS: usize = 600;
Expand Down

0 comments on commit f3c8348

Please sign in to comment.