Skip to content

Commit 03d138b

Browse files
gecage952Lance-Drane
authored andcommitted
Remove debugging statements and fix typos
1 parent 0bb61a8 commit 03d138b

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

examples/4_service_to_service/example_1_service.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
class ExampleServiceOneCapabilityImplementation(IntersectBaseCapabilityImplementation):
23-
"""Service One Capability."""
23+
"""Service 1 Capability."""
2424

2525
@intersect_status()
2626
def status(self) -> str:
@@ -30,7 +30,6 @@ def status(self) -> str:
3030
@intersect_message()
3131
def pass_text_to_service_2(self, text: str) -> None:
3232
"""Takes in a string parameter and sends it to service 2."""
33-
logger.info('maing it to service one')
3433
msg_to_send = IntersectDirectMessageParams(
3534
destination='example-organization.example-facility.example-system.example-subsystem.service-two',
3635
operation='ServiceTwo.test_service',
@@ -42,8 +41,7 @@ def pass_text_to_service_2(self, text: str) -> None:
4241

4342
@intersect_event(events={'response_event': IntersectEventDefinition(event_type=str)})
4443
def service_2_handler(self, msg: str) -> None:
45-
"""Handles response from service two and emites the response as an event for the client."""
46-
logger.info('maing it to right before emitting event')
44+
"""Handles response from service 2 and emits the response as an event for the client."""
4745
self.intersect_sdk_emit_event('response_event', f'Received Response from Service 2: {msg}')
4846

4947

@@ -72,7 +70,7 @@ def service_2_handler(self, msg: str) -> None:
7270
capability = ExampleServiceOneCapabilityImplementation()
7371
capability.capability_name = 'ServiceOne'
7472
service = IntersectService([capability], config)
75-
logger.info('Starting service one, use Ctrl+C to exit.')
73+
logger.info('Starting Service 1, use Ctrl+C to exit.')
7674
default_intersect_lifecycle_loop(
7775
service,
7876
)

examples/4_service_to_service/example_2_service.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class ExampleServiceTwoCapabilityImplementation(IntersectBaseCapabilityImplementation):
20-
"""Service Two Capability."""
20+
"""Service 2 Capability."""
2121

2222
@intersect_status()
2323
def status(self) -> str:
@@ -27,7 +27,6 @@ def status(self) -> str:
2727
@intersect_message
2828
def test_service(self, text: str) -> str:
2929
"""Returns the text given along with acknowledgement."""
30-
logger.info('Making it to service 2')
3130
return f'Acknowledging service one text -> {text}'
3231

3332

@@ -56,7 +55,7 @@ def test_service(self, text: str) -> str:
5655
capability = ExampleServiceTwoCapabilityImplementation()
5756
capability.capability_name = 'ServiceTwo'
5857
service = IntersectService([capability], config)
59-
logger.info('Starting service two, use Ctrl+C to exit.')
58+
logger.info('Starting Service 2, use Ctrl+C to exit.')
6059
default_intersect_lifecycle_loop(
6160
service,
6261
)

examples/4_service_to_service/example_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,19 @@
2121

2222

2323
class SampleOrchestrator:
24-
"""Simply contains an event callback for events from Service One."""
24+
"""Simply contains an event callback for events from Service 1."""
2525

2626
def event_callback(
2727
self, _source: str, _operation: str, _event_name: str, payload: INTERSECT_JSON_VALUE
2828
) -> None:
29-
"""This simply prints the event from Service One to your console.
29+
"""This simply prints the event from Service 1 to your console.
3030
3131
Params:
3232
source: the source of the response message.
3333
operation: the name of the function we called in the original message.
3434
_has_error: Boolean value which represents an error.
3535
payload: Value of the response from the Service.
3636
"""
37-
logger.info('making it to event callback')
3837
print(payload)
3938

4039

0 commit comments

Comments
 (0)