Skip to content

Commit 8efdc75

Browse files
authored
Add data batching when inserting data. (#10)
* Add data batching when inserting data.
1 parent 6d78e9f commit 8efdc75

File tree

7 files changed

+355
-80
lines changed

7 files changed

+355
-80
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ before_install:
1010
- export GOARCH="${MY_GOARCH}"
1111
install:
1212
- export GOPATH=`pwd`
13+
- export CGO_ENABLED=0
1314
- mkdir -p bin
1415
script:
15-
- go build -o bin/coscale-cli$EXTENSION coscale
16+
- if [ "$GOOS" == "linux" ]; then
17+
go test -timeout 20m -a -v coscale/... || travis_terminate 1;
18+
fi
19+
- go build -a -tags netgo -ldflags '-w' -o bin/coscale-cli$EXTENSION coscale
1620
deploy:
1721
provider: releases
1822
api_key:

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
22
export GOPATH=`pwd`
33
mkdir -p bin
4+
45
CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w' -o bin/coscale-cli coscale

src/coscale/api/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const (
2424
DEFAULT_STRING_VALUE string = `!>dUmmy<!`
2525
// DEFAULT_INT64_VALUE defines the default value for an integer flag.
2626
DEFAULT_INT64_VALUE int64 = math.MinInt64
27+
// MaxUploadSize for data call.
28+
MaxUploadSize int = 10 * 1024 * 1024 // 10MB
2729
)
2830

2931
const (

0 commit comments

Comments
 (0)