@ -72,12 +72,12 @@ func Init() error {
time.Sleep(time.Second)
seed, err = recordNewDaily()
log.Printf("Daily Run Seed: %s", seed)
if err != nil {
log.Printf("error while recording new daily: %s", err)
} else {
}
})
return err
@ -27,7 +27,7 @@ func TryAddDailyRun(seed string) (string, error) {
var actualSeed string
err := handle.QueryRow("INSERT INTO dailyRuns (seed, date) VALUES (?, UTC_DATE()) ON DUPLICATE KEY UPDATE date = date RETURNING seed", seed).Scan(&actualSeed)
return "INVALID", err
return "", err
return actualSeed, nil
@ -37,7 +37,7 @@ func GetDailyRunSeed() (string, error) {
var seed string
err := handle.QueryRow("SELECT seed FROM dailyRuns WHERE date = UTC_DATE()").Scan(&seed)
return seed, nil