Skip to content

Commit

Permalink
bump version to v0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prabirshrestha committed Sep 24, 2024
1 parent d31fee1 commit 907b0de
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
4 changes: 2 additions & 2 deletions examples/simple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ edition = "2021"
[dependencies]
anyhow = "1.0.70"
async-trait = "0.1.68"
mq = { path = "../../mq", version = "0.10.0" }
mq-surreal = { path = "../../mq-surreal", version = "0.10.0" }
mq = { path = "../../mq", version = "0.20.0" }
mq-surreal = { path = "../../mq-surreal", version = "0.20.0" }
num_cpus = "1.15.0"
serde = { version = "1.0.159", features = ["serde_derive"] }
serde_json = "1.0.94"
Expand Down
4 changes: 2 additions & 2 deletions mq-surreal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mq-surreal"
version = "0.10.0"
version = "0.20.0"
edition = "2021"
authors = ["Prabir Shrestha <mail@prabir.me>"]
license = "MIT"
Expand All @@ -12,7 +12,7 @@ keywords = ["job", "scheduler", "queue"]

[dependencies]
async-trait = "0.1.80"
mq = { "path" = "../mq", version = "0.10.0" }
mq = { "path" = "../mq", version = "0.20.0" }
serde_json = "1.0.116"
surrealdb = "2.0.1"
time = { version = "0.3.36", features = ["std", "serde"] }
35 changes: 20 additions & 15 deletions mq-surreal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@
### Define Schema

```sql
DEFINE TABLE queue SCHEMAFULL;
DEFINE FIELD created_at ON queue TYPE datetime;
DEFINE FIELD updated_at ON queue TYPE datetime;
DEFINE FIELD scheduled_at ON queue TYPE datetime;
DEFINE FIELD locked_at ON queue TYPE option<datetime>;
DEFINE FIELD queue ON queue TYPE string;
DEFINE FIELD kind ON queue TYPE string;
DEFINE FIELD max_attempts ON queue TYPE number;
DEFINE FIELD attempts ON queue TYPE number;
DEFINE FIELD priority ON queue TYPE number;
DEFINE FIELD unique_key ON queue TYPE option<string>;
DEFINE FIELD lease_time ON queue TYPE number;
DEFINE FIELD payload ON queue FLEXIBLE TYPE object;
DEFINE FIELD error_reason ON queue FLEXIBLE TYPE option<object>;
DEFINE TABLE IF NOT EXISTS queue SCHEMAFULL;
DEFINE FIELD IF NOT EXISTS created_at ON queue TYPE datetime;
DEFINE FIELD IF NOT EXISTS updated_at ON queue TYPE datetime;
DEFINE FIELD IF NOT EXISTS scheduled_at ON queue TYPE datetime;
DEFINE FIELD IF NOT EXISTS locked_at ON queue TYPE option<datetime>;
DEFINE FIELD IF NOT EXISTS queue ON queue TYPE string;
DEFINE FIELD IF NOT EXISTS kind ON queue TYPE string;
DEFINE FIELD IF NOT EXISTS max_attempts ON queue TYPE number;
DEFINE FIELD IF NOT EXISTS attempts ON queue TYPE number;
DEFINE FIELD IF NOT EXISTS priority ON queue TYPE number;
DEFINE FIELD IF NOT EXISTS unique_key ON queue TYPE option<string>;
DEFINE FIELD IF NOT EXISTS lease_time ON queue TYPE number;
DEFINE FIELD IF NOT EXISTS payload ON queue FLEXIBLE TYPE object;
DEFINE FIELD IF NOT EXISTS error_reason ON queue FLEXIBLE TYPE option<object>;
```

Requires SurrealDB v1.0.0-beta9+
# Surrealdb Compatibility

mq-surreal version | surrealdb version
----------------------------|------------------
`0.10.0` | `>= 1.5.0 && < 2.x`
`0.20.x` | `>= 2.0.0 && < 3.x`
2 changes: 1 addition & 1 deletion mq/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mq"
version = "0.10.0"
version = "0.20.0"
authors = ["Prabir Shrestha <mail@prabir.me>"]
edition = "2021"
license = "MIT"
Expand Down

0 comments on commit 907b0de

Please sign in to comment.