mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 23:39:04 +00:00
Worker cache
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user