Skip to content

Commit

Permalink
Merge branch 'main' into feat/ent-faktory-unique-and-expiring
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Jan 4, 2024
2 parents 6126a80 + 03775db commit 689d14d
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
strategy:
matrix:
msrv: ["1.60.0"]
msrv: ["1.70.0"]
name: ubuntu / ${{ matrix.msrv }}
steps:
- uses: actions/checkout@v4
Expand Down
145 changes: 71 additions & 74 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "faktory"
version = "0.12.1"
version = "0.12.2"
authors = ["Jon Gjengset <[email protected]>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

readme = "README.md"
description = "API bindings for the language-agnostic Faktory work server"
repository = "https://github.com/jonhoo/faktory-rs.git"

Expand All @@ -31,7 +30,7 @@ chrono = { version = "0.4", features = ["serde", "clock"], default-features = fa
url = "2"
fnv = "1.0.5"
native-tls = { version = "0.2", optional = true }
clap = { version = "3.1.0", optional = true }
clap = { version = "4.4.10", optional = true }
thiserror = "1.0.30"
derive_builder = "0.12.0"

Expand Down
13 changes: 7 additions & 6 deletions src/bin/loadtest.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use clap::value_parser;
use clap::{Arg, Command};
use faktory::*;
use rand::prelude::*;
Expand All @@ -16,21 +17,21 @@ fn main() {
.arg(
Arg::new("jobs")
.help("Number of jobs to run")
.value_parser(value_parser!(usize))
.index(1)
.default_value("30000")
.takes_value(true),
.default_value("30000"),
)
.arg(
Arg::new("threads")
.help("Number of consumers/producers to run")
.value_parser(value_parser!(usize))
.index(2)
.default_value("10")
.takes_value(true),
.default_value("10"),
)
.get_matches();

let jobs = matches.value_of_t_or_exit::<usize>("jobs");
let threads = matches.value_of_t_or_exit::<usize>("threads");
let jobs: usize = *matches.get_one("jobs").expect("default_value is set");
let threads: usize = *matches.get_one("threads").expect("default_value is set");
println!(
"Running loadtest with {} jobs and {} threads",
jobs, threads
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 @@ -17,7 +17,7 @@ pub use self::resp::*;

const JOB_DEFAULT_QUEUE: &str = "default";
const JOB_DEFAULT_RESERVED_FOR_SECS: usize = 600;
const JOB_DEFAULT_RETRY_COUNT: usize = 25;
const JOB_DEFAULT_RETRY_COUNT: isize = 25;
const JOB_DEFAULT_PRIORITY: u8 = 5;
const JOB_DEFAULT_BACKTRACE: usize = 0;

Expand Down Expand Up @@ -111,7 +111,7 @@ pub struct Job {
/// Defaults to 25.
#[serde(skip_serializing_if = "Option::is_none")]
#[builder(default = "Some(JOB_DEFAULT_RETRY_COUNT)")]
pub retry: Option<usize>,
pub retry: Option<isize>,

/// The priority of this job from 1-9 (9 is highest).
///
Expand Down

0 comments on commit 689d14d

Please sign in to comment.