|
|
|
@ -61,7 +61,7 @@ func Init() error {
|
|
|
|
|
secret = newSecret
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
seed, err := recordNewDaily()
|
|
|
|
|
seed, err := db.TryAddDailyRun(Seed())
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Print(err)
|
|
|
|
|
}
|
|
|
|
@ -71,7 +71,7 @@ func Init() error {
|
|
|
|
|
_, err = scheduler.AddFunc("@daily", func() {
|
|
|
|
|
time.Sleep(time.Second)
|
|
|
|
|
|
|
|
|
|
seed, err = recordNewDaily()
|
|
|
|
|
seed, err = db.TryAddDailyRun(Seed())
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Printf("error while recording new daily: %s", err)
|
|
|
|
|
} else {
|
|
|
|
@ -99,7 +99,3 @@ func deriveSeed(seedTime time.Time) []byte {
|
|
|
|
|
|
|
|
|
|
return hashedSeed[:]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func recordNewDaily() (string, error) {
|
|
|
|
|
return db.TryAddDailyRun(Seed())
|
|
|
|
|
}
|
|
|
|
|