mirror of
https://github.com/simon-ding/polaris.git
synced 2026-04-21 03:07:30 +08:00
refactor: db code
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/robfig/cron"
|
||||
)
|
||||
|
||||
func NewEngine(db *db.Client, language string) *Engine {
|
||||
func NewEngine(db db.Database, language string) *Engine {
|
||||
return &Engine{
|
||||
db: db,
|
||||
cron: cron.New(),
|
||||
@@ -31,7 +31,7 @@ type scheduler struct {
|
||||
f func() error
|
||||
}
|
||||
type Engine struct {
|
||||
db *db.Client
|
||||
db db.Database
|
||||
cron *cron.Cron
|
||||
tasks utils.Map[int, *Task]
|
||||
language string
|
||||
|
||||
Reference in New Issue
Block a user