15 releases (7 breaking)
0.20.1 | Sep 24, 2024 |
---|---|
0.10.0 | May 7, 2024 |
0.9.0 | Dec 29, 2023 |
0.7.0 | Sep 14, 2023 |
0.4.8 | Apr 29, 2023 |
#14 in #job-queue
30KB
737 lines
mq-surreal
SQL
Define Schema
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>;
Surrealdb Compatibility
mq-surreal version | surrealdb version |
---|---|
0.10.0 |
>= 1.5.0 && < 2.x |
0.20.x |
>= 2.0.0 && < 3.x |
Dependencies
~74MB
~1.5M SLoC