feat(backend): implement postgres job queue

This commit is contained in:
2026-06-21 01:39:32 +03:30
parent d95f3c27c1
commit 24a025587e
29 changed files with 1466 additions and 0 deletions

18
backend/jobs/admin.py Normal file
View File

@@ -0,0 +1,18 @@
from django.contrib import admin
from jobs.models import Job, JobEvent
@admin.register(Job)
class JobAdmin(admin.ModelAdmin):
list_display = ("id", "type", "status", "priority", "attempts", "max_attempts", "locked_by", "available_at")
list_filter = ("status", "type")
search_fields = ("id", "type", "idempotency_key", "locked_by")
readonly_fields = ("created_at", "updated_at", "finished_at")
@admin.register(JobEvent)
class JobEventAdmin(admin.ModelAdmin):
list_display = ("id", "job", "type", "attempt", "worker_id", "created_at")
list_filter = ("type",)
search_fields = ("job__id", "worker_id", "message")