#2 mark projects as to be moved
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3a82bf1776
commit
a31cb3d307
5 changed files with 90 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
|||
package store
|
||||
|
||||
import (
|
||||
"github.com/go-co-op/gocron"
|
||||
"github.com/mehdioa/nlog"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -12,6 +13,7 @@ type Store struct {
|
|||
GracePeriod time.Duration
|
||||
Projects map[string]*Project
|
||||
Logger *nlog.Logger
|
||||
Scheduler *gocron.Scheduler
|
||||
lock sync.RWMutex
|
||||
}
|
||||
|
||||
|
@ -20,12 +22,12 @@ type Project struct {
|
|||
LastChange time.Time
|
||||
Created time.Time
|
||||
ProjectName string
|
||||
ShouldMove bool
|
||||
Logger *nlog.Node
|
||||
}
|
||||
|
||||
func NewStore(Logger *nlog.Logger) *Store {
|
||||
store := &Store{Logger: Logger, Projects: make(map[string]*Project)}
|
||||
|
||||
func NewStore(Logger *nlog.Logger, sourcePath []string, gracePeriod time.Duration) *Store {
|
||||
store := &Store{Logger: Logger, Projects: make(map[string]*Project), SourcePath: sourcePath, GracePeriod: gracePeriod}
|
||||
return store
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue