feat: add river jobs

This commit is contained in:
Rogee
2024-12-30 17:16:13 +08:00
parent afba917fcc
commit 492f64904c
4 changed files with 83 additions and 13 deletions

15
contracts/cron_job.go Normal file
View File

@@ -0,0 +1,15 @@
package contracts
import (
"time"
"github.com/riverqueue/river"
)
type CronJob interface {
Description() string
Periodic() time.Duration
JobArgs() river.JobArgs
InsertOpts() *river.InsertOpts
RunOnStart() bool
}