This website requires JavaScript.
Explore
Help
Register
Sign in
goffee
/
core
Watch
2
Star
0
Fork
You've already forked core
3
Code
Issues
Pull requests
Projects
Releases
20
Packages
Wiki
Activity
Actions
develop
#33
Merged
zeni
merged 2 commits from
develop
into
main
2026-06-21 22:41:25 -04:00
Conversation
0
Commits
2
Files changed
3
+547
2 commits
Author
SHA1
Message
Date
Zeni Kim
7ec601ca10
Merge pull request 'Scheduler as a first-class core module feature, following the same pattern used for the Asynq queue system' (
#32
) from jacs/core:scheduler into develop
...
Reviewed-on:
#32
2026-06-21 22:09:23 -04:00
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