Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Nov 23, 2024
1 parent 22a4d18 commit cded093
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/proto/client/mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Client {
/// you will want to use it for administration purposes only.
///
/// Similar to [`Client::requeue`], but will create a filter (see [`MutationFilter`])
/// with the gived `jids` for you.
/// with the given `jids` for you.
pub async fn requeue_by_ids<'a>(
&mut self,
target: MutationTarget,
Expand Down Expand Up @@ -83,7 +83,7 @@ impl Client {
/// you will want to use it for administration purposes only.
///
/// Similar to [`Client::discard`], but will create a filter (see [`MutationFilter`])
/// with the gived `jids` for you.
/// with the given `jids` for you.
pub async fn discard_by_ids<'a>(
&mut self,
target: MutationTarget,
Expand Down Expand Up @@ -129,7 +129,7 @@ impl Client {
/// you will want to use it for administration purposes only.
///
/// Similar to [`Client::kill`], but will create a filter (see [`MutationFilter`])
/// with the gived `jids` for you.
/// with the given `jids` for you.
pub async fn kill_by_ids<'a>(
&mut self,
target: MutationTarget,
Expand All @@ -145,10 +145,10 @@ impl Client {
/// you will want to use it for administration purposes only.
///
/// Will have the same effect as [`Client::discard`] with an empty [`MutationFilter`],
/// but is special cased by Faktory and so is performed faster. Can be though of as
/// but is special cased by Faktory and so is performed faster. Can be thought of as
/// `TRUNCATE tablename` operation in the SQL world versus `DELETE FROM tablename`.
///
/// E.g. to purged all the jobs that are pending in the `reties` set:
/// E.g. to purge all the jobs that are pending in the `reties` set:
/// ```no_run
/// # tokio_test::block_on(async {
/// # use faktory::{Client, MutationTarget};
Expand All @@ -161,7 +161,7 @@ impl Client {
}

Check warning on line 161 in src/proto/client/mutation.rs

View check run for this annotation

Codecov / codecov/patch

src/proto/client/mutation.rs#L159-L161

Added lines #L159 - L161 were not covered by tests

// For reference: https://github.com/contribsys/faktory/blob/10ccc2270dc2a1c95c3583f7c291a51b0292bb62/server/mutate.go#L35-L59
// The faktory will pull the targeted set from Redis to it's memory, iterate over each stringified job matching
// The faktory will pull the targeted set from Redis to it's memory, iterate over each stringified job
// looking for a substring "id":"..." or performing regexp search, then deserialize the matches into Jobs and
// perform the action (e.g. requeue).
async fn mutate<'a>(
Expand Down
6 changes: 3 additions & 3 deletions src/proto/single/mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub struct MutationFilter<'a> {
#[builder(default)]
pub jids: Option<&'a [&'a JobId]>,

/// Match attern to use for filtering.
/// Match pattern to use for filtering.
///
/// Faktory will pass this directly to Redis's `SCAN` command,
/// so please see the [`SCAN` documentation](https://redis.io/docs/latest/commands/scan/)
Expand All @@ -81,7 +81,7 @@ impl<'a> MutationFilter<'_> {
/// Creates an empty filter.
///
/// Sending a mutation command (e.g. [`Client::discard`]) with an empty
/// filter effectively means perform no filtering at all.
/// filter effectively means performing no filtering at all.
pub fn empty() -> Self {
Self {
kind: None,
Expand All @@ -90,7 +90,7 @@ impl<'a> MutationFilter<'_> {
}
}

/// Creates a new builder for a [`MutationFilter`]
/// Creates a new builder for a [`MutationFilter`].
pub fn builder() -> MutationFilterBuilder<'a> {
MutationFilterBuilder::default()
}
Expand Down

0 comments on commit cded093

Please sign in to comment.