2020
2121
2222class 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 )
0 commit comments