How samudralaajaykumarrr/taskforge works
TaskForge accepts authenticated job and workflow requests, persists durable state in PostgreSQL, and runs jobs through competing workers with leases, heartbeats, retries, cancellation, and timeouts. Workflows add dependency-gated execution on that same job engine. The graph also shows operator controls, retention, and diagnostics. Workflow and several ancillary subsystem links rely on README documentation because their implementation was not sampled; uncertain call wiring is omitted.
Main entry points: api HTTP API · worker.go Worker loop · store Job store · principal Principal and keys
Components 18
Request handling
- API process
cmd/api/main.go - HTTP API
internal/api
Job execution
- Workflow engine
internal/workflow - Worker process
cmd/worker/main.go - Worker loop
internal/worker/worker.go - Handler registry
internal/handler/handler.go - Job model
internal/job
Durable state
- Job store
internal/store - PostgreSQL
- Transactional enqueue
txenqueue/txenqueue.go
Operations and policy
- Principal and keys
internal/principal - Queue governance
internal/governance - Admin CLI
cmd/taskforge-admin/main.go - Retention sweeper
internal/retention - Retention process
cmd/taskforge-retention/main.go
Diagnostics
- Metrics and logs
internal/metrics - Invariant checker
internal/invariant
Other components
- API client
Connections 21
- API client → HTTP API: submits and queries
- API process → HTTP API: configures and serves
- HTTP API → Principal and keys: authenticates
- HTTP API → Job store: reads and writes jobs
- HTTP API → Workflow engine: handles workflows
- HTTP API → Queue governance: checks limits
- HTTP API → Metrics and logs: records metrics
- Worker process → Worker loop: runs
- Worker loop → Job store: claims and completes
- Worker loop → Handler registry: dispatches jobs
- Worker loop → Job model: uses job data
- Workflow engine → Job store: tracks workflow jobs
- Job store → PostgreSQL: reads and writes
- Principal and keys → PostgreSQL: stores credentials
- Queue governance → PostgreSQL: stores limits
- Admin CLI → Principal and keys: manages keys
- Admin CLI → Queue governance: configures queues
- Retention process → Retention sweeper: runs sweeps
- Retention sweeper → PostgreSQL: deletes expired records
- Invariant checker → PostgreSQL: checks durable state
- Transactional enqueue → PostgreSQL: enqueues transactionally