Update structures.go

This commit is contained in:
akp 2023-02-11 19:14:42 +00:00
parent 87c1573c2d
commit 1049f53f39
No known key found for this signature in database
GPG key ID: AA5726202C8879B7

View file

@ -55,15 +55,6 @@ func LoadFile(client *redis.Client, filename string) error {
sched := fmt.Sprintf("schedule:%s:%d", record.Schedule.CIFTrainUid, n)
existsRes := client.Exists(context.Background(), sched)
if err := existsRes.Err(); err != nil {
return err
}
if rx, _ := existsRes.Result(); rx != 0 {
log.Fatal().Msg(record.Schedule.CIFTrainUid)
}
r := client.HMSet(context.Background(), sched, record.Schedule.ToMap())
if err := r.Err(); err != nil {
return err