Releases: cptrodgers/aj
Releases · cptrodgers/aj
v0.7.0
What's Changed
- Refactor: Migrate to simple Job builder by @cptrodgers in #11
// Remove build, unwrap.
Print { number: 1 }
.job()
.delay(Duration::seconds(1));
- feat: Plugin by @cptrodgers in #12
pub struct SamplePlugin;
#[async_trait]
impl JobPlugin for SamplePlugin {
async fn change_status(&self, job_id: &str, job_status: JobStatus) {
println!("Hello, Job {job_id} change status to {job_status:?}");
}
async fn before_run(&self, job_id: &str) {
println!("Before job {job_id} run");
}
async fn after_run(&self, job_id: &str) {
println!("After job {job_id} run");
}
}
Full Changelog: v0.6.7...v0.7.0
v0.6.7
fix: use super::#input_name
to access macro function in sub crate
Full Changelog: v0.6.6...v0.6.7
v0.6.6
v0.6.5
Full Changelog: v0.6.4...v0.6.5
v0.6.4
What's Changed
- feat: exponential backoff retry by @cptrodgers in #7
let job = Print { number: 3 }
.job_builder()
.retry(Retry::new_exponential_backoff(
Some(max_retries),
// Initial Backoff value
chrono::Duration::seconds(1),
))
.build()
.unwrap();
let _ = job.run().await.unwrap();
- feat: update work queue config to control processing performance.
AJ::update_work_queue(aj::queue:WorkQueueConfig {
// 50 ms will fetch job again
process_tick_duration: choro::Duration::milliseconds(50),
// Only process 10 jobs at time
max_processing_jobs: 10,
}).await;
Full Changelog: v0.6.3...v0.6.4
v0.6.3
What's Changed
- feat: manual retry by @cptrodgers in #6
- execute will use
&mut self
instead of&self
- public aj::Redis
Full Changelog: v0.6.2...v0.6.3
v0.6.2
feat: support #[job]
macro to generate background job
#[job]
async hello(name: String) {
println!("Hello, {name}");
}
Full Changelog: v0.6.1...v0.6.2
v0.6.1
feat: add do_run
to allow create a background job in sync function (no need await)
Full Changelog: v0.6.0...v0.6.1
v0.6.0
What's Changed
- Refactor Job by @cptrodgers in #1
- Refactor Work Queue by @cptrodgers in #2
- feat: derive macro by @cptrodgers in #3
- Fix: processing job block cancel fn by @cptrodgers in #4
- feat: handle concurrent processing jobs at time
New Contributors
- @cptrodgers made their first contribution in #1
Full Changelog: v0.5.1...v0.6.0
v0.5.1
Full Changelog: v0.5.0...v0.5.1