A high-performance, concurrent job queue system built with Go, PostgreSQL, and Gin, featuring:
- 🚀 Job submission, tracking, and result APIs
- 🛠️ Goroutine-based worker pool with concurrency support
- 📦 PostgreSQL storage (hosted via Neon)
- 🖥️ Minimal live HTML UI for job interaction
- 🔧 Structured logging via Logrus
- 🌐 Deployed live on Render
- 🔥 Web UI: https://jobqueue-5ese.onrender.com
- 🧠 GitHub Repo: github.com/omEAGRAWAL/jobqueue
jobqueue/
├── cmd/ # Entry point
│ └── main.go
├── config/ # DB connection logic
├── service/ # Job APIs and worker logic
├── model/ # Job model
├── index.html # index.html UI
├── go.mod / go.sum
├── render.yaml # Render deployment config
└── README.md
- RESTful APIs for job submission, status, and listing
- Worker Pool with goroutines for concurrent job execution
- Database-backed persistence (PostgreSQL)
- Live HTML UI with form + log console
- Structured logs for traceability
| Method | Endpoint | Description |
|---|---|---|
| POST | /jobs |
Submit a new job |
| GET | /jobs/:id |
Get job by ID |
| GET | /jobs |
List all jobs (paginated) |
{
"payload": "Example task"
}- Submit jobs from a form
- Auto-refreshes job status every 3 seconds
- Console-style live logs for feedback
Access via root: https://jobqueue-5ese.onrender.com/
- Submitted jobs are saved in the
jobstable withstatus = 'pending' - A worker pool picks up pending jobs from DB and processes them concurrently
- Upon processing, the job status is updated and result saved
git clone https://github.com/omEAGRAWAL/jobqueue.git
cd jobqueueUpdate .env or set environment variable:
DATABASE_URL="your_postgres_connection_string"go run cmd/main.goOpen: http://localhost:8081
- Submit Job:
POST http://localhost:8081/jobs - Get Job:
GET http://localhost:8081/jobs/1 - List Jobs:
GET http://localhost:8081/jobs
Body example:
{ "payload": "do this" }- Uses
render.yamlfor config - Set environment variable
DATABASE_URLin Render dashboard - Build Command:
go build -o main ./cmd/main.go - Start Command:
./main
- Add job retry mechanism
- WebSocket-based real-time logs
- Authentication for admin UI
- Metrics dashboard (e.g., Prometheus + Grafana)
Made with ❤️ by Om Agrawal
MIT License. See LICENSE file.
