Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

limit the number of processes to a safe boundary #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/drive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"os"
"path/filepath"

"runtime"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gofmt your code

"github.com/rakyll/command"
"github.com/rakyll/drive"
"github.com/rakyll/drive/config"
Expand All @@ -37,6 +37,7 @@ const (
)

func main() {
runtime.GOMAXPROCS(runtime.NumCPU()) // Use all the machine's cores
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should always honor the GOMAXPROCS env variable.

command.On("init", descInit, &initCmd{}, []string{})
command.On("pull", descPull, &pullCmd{}, []string{})
command.On("push", descPush, &pushCmd{}, []string{})
Expand Down