Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bugs #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ import time

import grpc

import wonderlandClient
from wonderlandClient import (
new_client,
Job,
Expand Down
6 changes: 3 additions & 3 deletions wonderlandClient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
)

from .wonderland_pb2_grpc import (
wonderlandServicer,
wonderlandStub,
add_wonderlandServicer_to_server
WonderlandServicer,
WonderlandStub,
add_WonderlandServicer_to_server
)

from .util import (
Expand Down
4 changes: 2 additions & 2 deletions wonderlandClient/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import grpc
import yaml

from .wonderland_pb2_grpc import wonderlandStub
from .wonderland_pb2_grpc import WonderlandStub


def new_client():
Expand All @@ -22,7 +22,7 @@ def new_client_from_path(config_path):
('grpc.max_receive_message_length', 1024 * 1024 * 1024),
)
)
return wonderlandStub(channel)
return WonderlandStub(channel)


def load_config(config_path):
Expand Down
20 changes: 10 additions & 10 deletions wonderlandClient/wonderland_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import wonderlandClient.wonderland_pb2 as wonderland__pb2


class wonderlandStub(object):
class WonderlandStub(object):
# missing associated documentation comment in .proto file
pass

Expand All @@ -15,38 +15,38 @@ def __init__(self, channel):
channel: A grpc.Channel.
"""
self.CreateJob = channel.unary_unary(
'/wonderland/CreateJob',
'/Wonderland/CreateJob',
request_serializer=wonderland__pb2.Job.SerializeToString,
response_deserializer=wonderland__pb2.Job.FromString,
)
self.GetJob = channel.unary_unary(
'/wonderland/GetJob',
'/Wonderland/GetJob',
request_serializer=wonderland__pb2.RequestWithId.SerializeToString,
response_deserializer=wonderland__pb2.Job.FromString,
)
self.ListJobs = channel.unary_unary(
'/wonderland/ListJobs',
'/Wonderland/ListJobs',
request_serializer=wonderland__pb2.ListJobsRequest.SerializeToString,
response_deserializer=wonderland__pb2.ListOfJobs.FromString,
)
self.ModifyJob = channel.unary_unary(
'/wonderland/ModifyJob',
'/Wonderland/ModifyJob',
request_serializer=wonderland__pb2.Job.SerializeToString,
response_deserializer=wonderland__pb2.Job.FromString,
)
self.PullPendingJobs = channel.unary_unary(
'/wonderland/PullPendingJobs',
'/Wonderland/PullPendingJobs',
request_serializer=wonderland__pb2.ListJobsRequest.SerializeToString,
response_deserializer=wonderland__pb2.ListOfJobs.FromString,
)
self.DeleteJob = channel.unary_unary(
'/wonderland/DeleteJob',
'/Wonderland/DeleteJob',
request_serializer=wonderland__pb2.RequestWithId.SerializeToString,
response_deserializer=wonderland__pb2.Job.FromString,
)


class wonderlandServicer(object):
class WonderlandServicer(object):
# missing associated documentation comment in .proto file
pass

Expand Down Expand Up @@ -93,7 +93,7 @@ def DeleteJob(self, request, context):
raise NotImplementedError('Method not implemented!')


def add_wonderlandServicer_to_server(servicer, server):
def add_WonderlandServicer_to_server(servicer, server):
rpc_method_handlers = {
'CreateJob': grpc.unary_unary_rpc_method_handler(
servicer.CreateJob,
Expand Down Expand Up @@ -127,5 +127,5 @@ def add_wonderlandServicer_to_server(servicer, server):
),
}
generic_handler = grpc.method_handlers_generic_handler(
'wonderland', rpc_method_handlers)
'Wonderland', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))