Skip to content

Releases: mvniekerk/tokio-cron-scheduler

0.7.0 Optional Prost usage

27 Apr 20:23
Compare
Choose a tag to compare
  1. The feature flag has_bytes enables Prost generated data structures to be used
  2. JobSchedulerError implements std::error::Error

0.6.8 Nats Jetstream prefix

20 Apr 06:42
Compare
Choose a tag to compare
  1. Nats Jetstream's bucket prefix is configurable. Expose this API on the NatsStoreBuilder

0.6.7 Fix Windows build

20 Apr 06:10
Compare
Choose a tag to compare
  1. Fix copying Prost compiled file on Windows. Thanks @wormtql for the PR

0.6.5 Nats store builder

18 Apr 07:27
Compare
Choose a tag to compare
  1. Adds NatsStoreBuilder to build a Nats store

v0.6.4

16 Apr 09:14
Compare
Choose a tag to compare
  1. Exports context::Context

v0.6.3

16 Apr 09:03
Compare
Choose a tag to compare
  1. Exports JobToRunAsync

0.6.2 Bug fix release

15 Apr 19:54
Compare
Choose a tag to compare
  1. Job::new and Job::new_async returns a Result that has the Error part being JobSchedulerError (not a Box<&dyn std:err:Err> as prior).
  2. JobScheduler::add returns the GUID of the job that is being added.

0.6.0 Persistent storage with PostgreSQL and Nats

05 Apr 21:27
Compare
Choose a tag to compare

Overview

This release brings persistent storage using either PostgreSQL or Nats. There's also a major refactoring of the innards of the library, but keeping the API (mostly) the same.

Thank you @vkill and @hgzimmerman for your contributions.

Migration

See the Migration Docs. Also check out the Nats integration and PostgreSQL integration docs if you want to use any of the persistent storage modules.

Examples

Nats

Setup a running Nats instance with Jetream enabled:

docker run --rm -it -p 4222:4222 -p 6222:6222 -p 7222:7222 -p 8222:8222 nats -js -DV

Then run the example:

cargo run --example nats --features="nats_storage tracing-subscriber"

PostgreSQL

Setup a running PostgreSQL instance:

docker run --rm -it -p 5432:5432 -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="" -e POSTGRES_HOST_AUTH_METHOD="trust" postgres:14.1

Then run the example:

POSTGRES_INIT_METADATA=true POSTGRES_INIT_NOTIFICATIONS=true cargo run --example postgres --features="postgres_storage tracing-subscriber"

0.6.0-beta.2 Nats persistent storage

03 Apr 19:34
Compare
Choose a tag to compare
Pre-release

We've got persistent storage! Using Nats..

New beta, new architecture it seems. This time it comes with designs (see bottom of the README). If you didn't implement your own scheduler, this version's only big change is the adding a reference of the scheduler when creating/removing notifications of a job. I like this architecture and it made implementing it on top of Nats very easy. I would expect porting it to other storage providers would be easier.

See migration.md for migrating from previous versions to this.

There's some PRs and issues I'd like to get into before doing 0.6.0 release proper. But this one is huge in code and refactoring wise.

0.6.0-beta.1 Start of persistent storage

13 Mar 19:20
Compare
Choose a tag to compare

The current aim of the 0.6.0 release is to have a way of storing jobs and their statuses.

Both the scheduler and the storage are now used as traits and not as concrete implementations.
The storage data of the jobs are sequenced using Prost! Protobufs. This allows for the bytes of a job to be stored and retrieved from the job store and then sequenced back into concrete jobs.
For beta 1, the existing functionality of in-memory storage are implemented accordingly and considered stable. That is - nothing should break if you use this over 0.5. If it breaks, please file a bug report.

For the user facing API, nothing huge has changed. However, I've added JobSchedulerError as my enum of when things go wrong, replacing Box in most of the places.

For beta 2, I'll be aiming for Nats.io storage, as this is the itch I wanted to scratch with this crate (end game for my use). I do see the current layout of the code like I wanted it to be for me to implement the Nats.io storage, as it follows a sort-of message driven way of creating jobs and notifications.

Comments are welcome!
Speaking of comments - there are lots more eprintln! in this crate now. Please comment if you'd rather not have me implement errors using the log crate. This will be done in beta 2 barring any requests not to.