Skip to content

Commit

Permalink
Reinstate timeout param (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomshutt authored Aug 1, 2023
1 parent 33de665 commit f877e6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions catalyst-uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"github.com/livepeer/go-tools/drivers"
)

var Version string

const WaitBetweenWrites = 5 * time.Second
const WriteTimeout = 30 * time.Second

var Version string

func main() {
os.Exit(run())
Expand All @@ -23,6 +22,7 @@ func main() {
func run() int {
// cmd line args
describe := flag.Bool("j", false, "Describe supported storage services in JSON format and exit")
timeout := flag.Duration("t", 30*time.Second, "Upload timeout")
flag.Parse()

// list enabled handlers and exit
Expand All @@ -46,7 +46,7 @@ func run() int {
return 1
}

err := core.Upload(os.Stdin, uri, WaitBetweenWrites, WriteTimeout)
err := core.Upload(os.Stdin, uri, WaitBetweenWrites, *timeout)
if err != nil {
log.Fatalf("Uploader failed for %s: %s", uri, err)
return 1
Expand Down

0 comments on commit f877e6f

Please sign in to comment.