Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Akrion committed Apr 25, 2024
1 parent a1949d8 commit 56424bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changelog

## v0.5.13-alpha
## v0.5.14-alpha
* Added print outs for client.execute.

## v0.5.13-alpha
* Fix (u)int128/hash handling.

## v0.5.12-alpha
* Add beta version of snowflake datastream APIs.

Expand Down
10 changes: 5 additions & 5 deletions rai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ func (c *Client) Execute(
return nil, err
}
if isTransactionComplete(&rsp.Transaction) {
fmt.Println(fmt.Sprintf("Txn state: %s.", rsp.Transaction.State))
fmt.Printf("Txn state: %s.\n", rsp.Transaction.State)
return rsp, nil // fast path
}
id := rsp.Transaction.ID
Expand All @@ -986,17 +986,17 @@ func (c *Client) Execute(
return nil, err
}
if isTransactionComplete(&rsp.Transaction) {
fmt.Println(fmt.Sprintf("Txn %s state: %s.", id, rsp.Transaction.State))
fmt.Printf("Txn %s state: %s.", id, rsp.Transaction.State)
return rsp, nil
}
fmt.Println(fmt.Sprintf("Txn %s state: %s.", id, rsp.Transaction.State))
fmt.Printf("Txn %s state: %s.", id, rsp.Transaction.State)
delta := time.Since(t0) // total run time
fmt.Println(fmt.Sprintf("Delta is %s.", delta))
fmt.Printf("Delta is %s.", delta)
pause := time.Duration(int64(delta) / 5) // 20% of total run time
if pause > twoMinutes {
pause = twoMinutes
}
fmt.Println(fmt.Sprintf("Pause took %s.", pause))
fmt.Printf("Pause took %s.", pause)
time.Sleep(pause)
}
}
Expand Down

0 comments on commit 56424bd

Please sign in to comment.