Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Use channel in messaging between goroutine instead of zmq.REQ
Browse files Browse the repository at this point in the history
This will resolve socket exhaust problem on high concurrency.

refs #160
  • Loading branch information
cheungpat committed Oct 25, 2016
2 parents 5d8b095 + 11c08e8 commit c3b7509
Show file tree
Hide file tree
Showing 7 changed files with 478 additions and 269 deletions.
1 change: 1 addition & 0 deletions .gogocyclo
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ignores = `pq`.(*recordScanner).Scan
ignores = `pq`.(*database).remoteColumnTypes
ignores = `skydb`.(Predicate).Validate
ignores = `skyconv`.ParseLiteral
ignores = `zmq`.(*Broker).Run
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go

go: 1.6
go: 1.6.3

addons:
postgresql: "9.5"
Expand Down Expand Up @@ -49,7 +49,7 @@ script:
- go generate ./pkg/...
- git status | grep "_string.go$"; test $? -eq 1
- gocyclo -over 15 pkg | gogocyclo
- go test --tags zmq -cover -timeout 1m ./pkg/...
- WITH_ZMQ=1 make test

before_deploy:
- if [[ -z "$TRAVIS_TAG" ]]; then make all; fi
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ before-test:
test:
# Run `go install` to compile packages to speed up test process
$(DOCKER_COMPOSE_RUN) go install $(GO_BUILD_ARGS)
$(DOCKER_COMPOSE_RUN) go test $(GO_BUILD_ARGS) -cover -timeout $(GO_TEST_TIMEOUT) ./pkg/...
$(DOCKER_COMPOSE_RUN) go test $(GO_BUILD_ARGS) -cover -timeout $(GO_TEST_TIMEOUT) -cpu 1,4 ./pkg/...

.PHONY: after-docker-test
after-docker-test:
Expand Down
Loading

0 comments on commit c3b7509

Please sign in to comment.