Closed jimu-os closed 1 year ago
lock, err := locker.Obtain(ctx, "my-key", 100*time.Millisecond, nil) if err == redislock.ErrNotObtained { fmt.Println("Could not obtain lock!") } else if err != nil { log.Fatalln(err) }
sorry, I am not following, what's the problem?
lock, err := locker.Obtain(ctx, "my-key", 100*time.Millisecond, nil) if err == redislock.ErrNotObtained { fmt.Println("Could not obtain lock!") } else if err != nil { log.Fatalln(err) }