Skip to content

Commit

Permalink
fix copy percentage log message
Browse files Browse the repository at this point in the history
  • Loading branch information
keyki committed May 18, 2018
1 parent 810d91d commit 2be1ba3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BINARY=pollprogress
VERSION=0.2.0
VERSION=0.2.1
OWNER=$(shell glu info| sed -n "s/Owner: //p")

deps:
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ func main() {
defer wg.Done()
act, sum, err := poll(cmd)
if err == nil {
log.Printf("Copy status to Storage Account of %s is: (%d/%d) %.2f%% ", storageAccount, act, sum, (float64(sum)/float64(act))*100)
log.Printf("Copy status to Storage Account of %s is: (%d/%d) %.2f%% ", storageAccount, act, sum, (float64(act)/float64(sum))*100)
}
for act < sum || err != nil {
time.Sleep(time.Second * 10)
act, sum, err = poll(cmd)
if err == nil {
log.Printf("Copy status to Storage Account of %s is: (%d/%d) %.2f%% ", storageAccount, act, sum, (float64(sum)/float64(act))*100)
log.Printf("Copy status to Storage Account of %s is: (%d/%d) %.2f%% ", storageAccount, act, sum, (float64(act)/float64(sum))*100)
}
}
}(storageAccount, cmd)
Expand Down

0 comments on commit 2be1ba3

Please sign in to comment.