13 releases (6 breaking)
0.10.0 | May 7, 2024 |
---|---|
0.9.0 | Dec 29, 2023 |
0.8.0 | Dec 29, 2023 |
0.7.0 | Sep 14, 2023 |
0.4.8 | Apr 29, 2023 |
#26 in #job-scheduler
175 downloads per month
29KB
731 lines
mq-surreal
SQL
Define Schema
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>;
Requires SurrealDB v1.0.0-beta9+
Dependencies
~45–60MB
~1M SLoC