MCPcopy
hub / github.com/apache/caldera / _emit_status_change_event

Method _emit_status_change_event

app/objects/secondclass/c_link.py:235–248  ·  view source on GitHub ↗
(self, from_status, to_status)

Source from the content-addressed store, hash-verified

233 self.command = self.encode_string(decoded_cmd.replace(self.RESERVED['origin_link_id'], self.id))
234
235 def _emit_status_change_event(self, from_status, to_status):
236 event_svc = BaseService.get_service('event_svc')
237
238 task = asyncio.get_event_loop().create_task(
239 event_svc.fire_event(
240 exchange=Link.EVENT_EXCHANGE,
241 queue=Link.EVENT_QUEUE_STATUS_CHANGED,
242 link=self.id,
243 from_status=from_status,
244 to_status=to_status
245 )
246 )
247
248 return task
249
250 async def _parse_link_result(self, result, parser, source_facts):
251 blob = b64decode(result).decode('utf-8')

Callers 2

statusMethod · 0.95

Calls 2

get_serviceMethod · 0.80
fire_eventMethod · 0.45

Tested by 1