Logo
Explore Help
Register Sign in
goffee/core
2
0
Fork
You've already forked core
3
Code Issues Pull requests Projects Releases 20 Packages Wiki Activity Actions

Scheduler as a first-class core module feature, following the same pattern used for the Asynq queue system #32

Merged
zeni merged 1 commit from jacs/core:scheduler into develop 2026-06-21 22:09:23 -04:00
Conversation 0 Commits 1 Files changed 3 +547

1 commit

Author SHA1 Message Date
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
Powered by Forgejo Version: 11.0.1 Page: 36ms Template: 2ms
English
Bahasa Indonesia Dansk Deutsch English Español Esperanto Filipino Français Italiano Latviešu Magyar nyelv Nederlands Plattdüütsch Polski Português de Portugal Português do Brasil Slovenščina Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API