Skip to content

Multi-Worker Queue

Use SQLite to coordinate which URL each worker fetches next, avoiding duplicate work across workers.

name = "Multi-Worker Queue"
workers = 4
url = "https://example.com"
selector = "body"
fields = ["dummy:body"]
interval = 60
  • UPDATE ... RETURNING atomically claims a target, so no two workers collide
  • ctx.shared passes the target ID between hooks in the same cycle
  • workers > 1 in config enables multi-worker mode
  • Each worker runs independently, claiming targets from the shared queue