Skip to main content

Module publisher

Module publisher 

Source

Structsยง

UpstashBatchPublisher
Batched Upstash publisher that issues a single Lua EVAL per tick, setting all snapshot keys atomically. Each SET+EX inside the Lua script counts as one billed Upstash command regardless of key count, cutting command costs ~6x compared to 6 independent SET calls.
UpstashRedisConfig ๐Ÿ”’
Configuration extracted from the markets-publisher env vars. All 6 publishers share the same Upstash Redis instance; only the markets publisher historically owned the credential env vars.

Constantsยง

ENDPOINT_ENV ๐Ÿ”’
PASSWORD_ENV ๐Ÿ”’
PER_SOURCE_TIMEOUT ๐Ÿ”’
PORT_ENV ๐Ÿ”’
UPSTASH_COMMAND_TIMEOUT ๐Ÿ”’
UPSTASH_CONNECT_TIMEOUT ๐Ÿ”’

Traitsยง

UpstashSnapshotSource
A single snapshot source that produces compressed payloads for the batch publisher.

Functionsยง

require_non_empty ๐Ÿ”’
system_time_to_millis