mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-21 17:28:59 -05:00
feat: stateful polling intervals (#2417)
* initial pass on stateful intervals * pr review comments + add evict expired idempotency keys * fix: goroutine leak and name vars better * fix some cleanup logic
This commit is contained in:
@@ -1756,3 +1756,13 @@ CREATE TABLE v1_idempotency_key (
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX v1_idempotency_key_unique_tenant_key ON v1_idempotency_key (tenant_id, key);
|
||||
|
||||
-- v1_operation_interval_settings represents the interval settings for a specific tenant. "Operation" means
|
||||
-- any sort of tenant-specific polling-based operation on the engine, like timeouts, reassigns, etc.
|
||||
CREATE TABLE v1_operation_interval_settings (
|
||||
tenant_id UUID NOT NULL,
|
||||
operation_id TEXT NOT NULL,
|
||||
-- The interval represents a Go time.Duration, hence the nanoseconds
|
||||
interval_nanoseconds BIGINT NOT NULL,
|
||||
PRIMARY KEY (tenant_id, operation_id)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user