Skip to content

Commit

Permalink
Merge 428b87f into 6e7d768
Browse files Browse the repository at this point in the history
  • Loading branch information
helllllllder committed Sep 1, 2021
2 parents 6e7d768 + 428b87f commit b5a2863
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ createproto:

@rm -rf ./bothub/protos/
@git clone --depth 1 --branch main https://github.com/Ilhasoft/weni-protobuffers ./bothub/protos/
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/inteligence/authentication.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/inteligence/organization.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/inteligence/repository.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/connect/project.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/src/weni/protobuf/intelligence/authentication.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/src/weni/protobuf/intelligence/organization.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/src/weni/protobuf/intelligence/repository.proto
@python -m grpc_tools.protoc --experimental_allow_proto3_optional --proto_path=./ --python_out=./ --grpc_python_out=./ ./bothub/protos/src/weni/protobuf/connect/project.proto


# Utils
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/connect_grpc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import grpc
from django.conf import settings

from bothub.protos.inteligence import project_pb2_grpc, project_pb2
from bothub.protos.src.weni.protobuf.connect import project_pb2_grpc, project_pb2


class ConnectGRPCClient:
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/organization/handlers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from bothub.api.grpc.organization.services import OrgService
from bothub.protos.inteligence import organization_pb2_grpc
from bothub.protos.src.weni.protobuf.intelligence import organization_pb2_grpc


def grpc_handlers(server):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/organization/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from bothub.authentication.models import User
from bothub.common.models import Organization, OrganizationAuthorization
from bothub.protos.inteligence import organization_pb2
from bothub.protos.src.weni.protobuf.intelligence import organization_pb2


class OrgProtoSerializer(proto_serializers.ModelProtoSerializer):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/organization/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
RepositoryAuthorization,
Repository,
)
from bothub.protos.inteligence.organization_pb2 import OrgStatistic
from bothub.protos.src.weni.protobuf.intelligence.organization_pb2 import OrgStatistic


class OrgService(
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/repository/handlers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .services import RepositoryService
from bothub.protos.inteligence import repository_pb2_grpc
from bothub.protos.src.weni.protobuf.intelligence import repository_pb2_grpc


def grpc_handlers(server):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/repository/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from bothub.api.v2.repository.serializers import RepositoryCategorySerializer
from bothub.common.models import Repository
from bothub.protos.inteligence import repository_pb2
from bothub.protos.src.weni.protobuf.intelligence import repository_pb2


class RepositoryProtoSerializer(proto_serializers.ModelProtoSerializer):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/repository/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
OrganizationAuthorization,
RepositoryAuthorization,
)
from bothub.protos.inteligence import repository_pb2_grpc, repository_pb2
from bothub.protos.src.weni.protobuf.intelligence import repository_pb2_grpc, repository_pb2


class RepositoryServiceTestCase(RPCTransactionTestCase):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/user/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
UserService,
UserLanguageService,
)
from bothub.protos.inteligence import authentication_pb2_grpc
from bothub.protos.src.weni.protobuf.intelligence import authentication_pb2_grpc


def grpc_handlers(server):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/user/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from rest_framework import serializers

from bothub.authentication.models import User
from bothub.protos.inteligence import authentication_pb2
from bothub.protos.src.weni.protobuf.intelligence import authentication_pb2


class UserProtoSerializer(proto_serializers.ModelProtoSerializer):
Expand Down
2 changes: 1 addition & 1 deletion bothub/api/grpc/user/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from bothub.api.v2.tests.utils import create_user_and_token
from bothub.authentication.models import User
from bothub.common.models import Organization, OrganizationAuthorization
from bothub.protos.inteligence import authentication_pb2_grpc, authentication_pb2
from bothub.protos.src.weni.protobuf.intelligence import authentication_pb2_grpc, authentication_pb2


class UserServiceTest(RPCTransactionTestCase):
Expand Down
4 changes: 1 addition & 3 deletions gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import multiprocessing

bind = "0.0.0.0:80"
workers = multiprocessing.cpu_count() * 2 + 1
workers = 3
worker_class = "gevent"
raw_env = ["DJANGO_SETTINGS_MODULE=bothub.settings"]

0 comments on commit b5a2863

Please sign in to comment.