Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bc900f387 | ||
|
|
e7a1db2c16 |
@@ -1,15 +1,22 @@
|
|||||||
package contracts
|
package contracts
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/riverqueue/river"
|
"github.com/riverqueue/river"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CronJob interface {
|
type CronJob interface {
|
||||||
Description() string
|
Args() []CronJobArg
|
||||||
Periodic() time.Duration
|
}
|
||||||
JobArgs() []river.JobArgs
|
|
||||||
InsertOpts() *river.InsertOpts
|
type CronJobArgInterface interface {
|
||||||
RunOnStart() bool
|
river.JobArgs
|
||||||
|
river.JobArgsWithInsertOpts
|
||||||
|
}
|
||||||
|
|
||||||
|
type CronJobArg struct {
|
||||||
|
Kind string
|
||||||
|
RunOnStart bool
|
||||||
|
PeriodicInterval river.PeriodicSchedule
|
||||||
|
|
||||||
|
Arg CronJobArgInterface
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user