alpha
Login
or
Join now
zzstoatzz.io
/
docket
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
zig port of github.com/chrisguidry/docket
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
docket
/
src
/
scripts
/
at
main
3 files
zzstoatzz
v0: perpetual loop end-to-end against Redis
2mo ago
c95db184
ack.lua
v0: perpetual loop end-to-end against Redis Fills out the skeleton with a working single-worker tick loop: - composite ops in src/backend/redis.zig: scheduleTask, promoteDueTasks, ackMessage, consumeStream, ensureConsumerGroup — each backed by an embedded Lua script (schedule.lua / promote_due.lua / ack.lua) so the state transitions are atomic. - Worker.tick: promote due ZSET entries -> XREADGROUP one -> dispatch via the comptime-erased task shim -> reschedule perpetual BEFORE ack so a perpetual task never silently dies. - examples/perpetual: registers a 2s perpetual task, runs 10s, observes ~5 ticks. Used as the v0 smoke gate. - compose.yml: redis:7-alpine on :6379 for local dev. The bug that gated this: EVAL returns Lua values as RESP bulk strings, not simple strings. The first cut only matched .string in the reply switch, fell through to an error, and the run looked like a hang rather than a clear failure. stringValue() in backend/redis.zig now accepts either variant; scheduleTask/ackMessage route through it. 3/3 tests pass; perpetual example produces 5 ticks in 10s as expected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 months ago
promote_due.lua
v0: perpetual loop end-to-end against Redis Fills out the skeleton with a working single-worker tick loop: - composite ops in src/backend/redis.zig: scheduleTask, promoteDueTasks, ackMessage, consumeStream, ensureConsumerGroup — each backed by an embedded Lua script (schedule.lua / promote_due.lua / ack.lua) so the state transitions are atomic. - Worker.tick: promote due ZSET entries -> XREADGROUP one -> dispatch via the comptime-erased task shim -> reschedule perpetual BEFORE ack so a perpetual task never silently dies. - examples/perpetual: registers a 2s perpetual task, runs 10s, observes ~5 ticks. Used as the v0 smoke gate. - compose.yml: redis:7-alpine on :6379 for local dev. The bug that gated this: EVAL returns Lua values as RESP bulk strings, not simple strings. The first cut only matched .string in the reply switch, fell through to an error, and the run looked like a hang rather than a clear failure. stringValue() in backend/redis.zig now accepts either variant; scheduleTask/ackMessage route through it. 3/3 tests pass; perpetual example produces 5 ticks in 10s as expected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 months ago
schedule.lua
v0: perpetual loop end-to-end against Redis Fills out the skeleton with a working single-worker tick loop: - composite ops in src/backend/redis.zig: scheduleTask, promoteDueTasks, ackMessage, consumeStream, ensureConsumerGroup — each backed by an embedded Lua script (schedule.lua / promote_due.lua / ack.lua) so the state transitions are atomic. - Worker.tick: promote due ZSET entries -> XREADGROUP one -> dispatch via the comptime-erased task shim -> reschedule perpetual BEFORE ack so a perpetual task never silently dies. - examples/perpetual: registers a 2s perpetual task, runs 10s, observes ~5 ticks. Used as the v0 smoke gate. - compose.yml: redis:7-alpine on :6379 for local dev. The bug that gated this: EVAL returns Lua values as RESP bulk strings, not simple strings. The first cut only matched .string in the reply switch, fell through to an error, and the run looked like a hang rather than a clear failure. stringValue() in backend/redis.zig now accepts either variant; scheduleTask/ackMessage route through it. 3/3 tests pass; perpetual example produces 5 ticks in 10s as expected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 months ago