Worker cache

This commit is contained in:
simon987
2019-02-19 21:38:20 -05:00
parent f235bfb588
commit 49ccf60c2e
5 changed files with 21 additions and 5 deletions

View File

@@ -12,6 +12,16 @@ import (
type Database struct {
db *sql.DB
saveTaskStmt *sql.Stmt
workerCache map[int64]*Worker
}
func New() *Database {
d := Database{}
d.workerCache = make(map[int64]*Worker)
return &d
}
func (database *Database) Reset() {