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