Jose Cely
|
3710fbe343
|
Create a scheduler as a first-class core module feature, following the same pattern used for the Asynq queue system. The new core/scheduler/ subpackage contains QueueItem and ProcessedItem GORM models (tables queue_items and processed_items), a Store for database operations (enqueue, claim batch with SELECT FOR UPDATE SKIP LOCKED, result recording, stuck recovery), a Semaphore kill switch, and the polling Scheduler loop with configurable interval and rate limit. The core/scheduler.go wrapper exposes a Schedulermux struct (analogous to Queuemux) with SchedulerInit(), AddWork(), SetStore(), and RunScheduler() methods, plus global accessors ResolveSchedulerStore() and SchedulerSemaphoreSetGreen/Red/IsGreen() so controllers can enqueue work and control the semaphore without importing the subpackage directly.
|
2026-06-13 18:19:01 -05:00 |
|
|
|
b757aef6b1
|
get queue configurations from config in cup
|
2026-05-18 22:34:37 -05:00 |
|
|
|
0db37d31b8
|
add config option to disable queues
|
2024-12-23 23:41:27 -05:00 |
|
|
|
7f38826b9c
|
initial commits 2
|
2024-09-12 17:13:16 -05:00 |
|