Skip to content

Releases: cptrodgers/aj

v0.7.0

30 Oct 12:41
Compare
Choose a tag to compare

What's Changed

// Remove build, unwrap.
 Print { number: 1 }
    .job()
    .delay(Duration::seconds(1));
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

26 Oct 16:37
Compare
Choose a tag to compare

fix: use super::#input_name to access macro function in sub crate

Full Changelog: v0.6.6...v0.6.7

v0.6.6

26 Oct 11:07
8cbb9d6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.5...v0.6.6

v0.6.5

25 Oct 15:24
Compare
Choose a tag to compare

Full Changelog: v0.6.4...v0.6.5

v0.6.4

20 Oct 05:41
Compare
Choose a tag to compare

What's Changed

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

15 Oct 13:43
Compare
Choose a tag to compare

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

13 Oct 08:15
Compare
Choose a tag to compare

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

12 Oct 15:36
Compare
Choose a tag to compare

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

12 Oct 07:49
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.1...v0.6.0

v0.5.1

22 Jun 08:06
Compare
Choose a tag to compare

Full Changelog: v0.5.0...v0.5.1