jetzig-framework / jetzig

Jetzig is a web framework written in Zig
MIT License
457 stars 21 forks source link

Background jobs #56

Closed bobf closed 5 months ago

bobf commented 5 months ago

Use in-memory KV store (JetKV) for simple job queue.

Build script generates an array of Zig modules in src/app/jobs/ and stores their name + run function (run(allocator, params, logger)).

View functions schedule jobs with arbitrary params.

Thread pool spawns a (configurable) number of workers and pops jobs from the queue, then invokes the appropriate run function.