mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
demo/digitalocean: allow stale queries
This commit is contained in:
@@ -56,10 +56,11 @@ func main() {
|
||||
|
||||
last := 0
|
||||
fmt.Printf("benchmarking %d allocations\n", total)
|
||||
opts := &api.QueryOptions{AllowStale: true}
|
||||
for {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
allocs, _, err := allocClient.List(nil)
|
||||
allocs, _, err := allocClient.List(opts)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user