|
|
@ -44,14 +44,14 @@ func Init() error {
|
|
|
|
secret = newSecret
|
|
|
|
secret = newSecret
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
err = recordNewRun()
|
|
|
|
err = recordNewDaily()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.Print(err)
|
|
|
|
log.Print(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log.Printf("Daily Run Seed: %s", Seed())
|
|
|
|
log.Printf("Daily Run Seed: %s", Seed())
|
|
|
|
|
|
|
|
|
|
|
|
scheduler.Every(1).Day().At("00:00").Do(recordNewRun())
|
|
|
|
scheduler.Every(1).Day().At("00:00").Do(recordNewDaily())
|
|
|
|
scheduler.StartAsync()
|
|
|
|
scheduler.StartAsync()
|
|
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
@ -70,7 +70,7 @@ func deriveSeed(seedTime time.Time) []byte {
|
|
|
|
return hashedSeed[:]
|
|
|
|
return hashedSeed[:]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func recordNewRun() error {
|
|
|
|
func recordNewDaily() error {
|
|
|
|
err := db.TryAddDailyRun(Seed())
|
|
|
|
err := db.TryAddDailyRun(Seed())
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|