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

Method _emit_state_change_event

app/objects/c_operation.py:520–533  ·  view source on GitHub ↗
(self, from_state, to_state)

Source from the content-addressed store, hash-verified

518 operation_adversary=self.adversary.name)
519
520 def _emit_state_change_event(self, from_state, to_state):
521 event_svc = BaseService.get_service('event_svc')
522
523 task = asyncio.get_event_loop().create_task(
524 event_svc.fire_event(
525 exchange=Operation.EVENT_EXCHANGE,
526 queue=Operation.EVENT_QUEUE_STATE_CHANGED,
527 op=self.id,
528 from_state=from_state,
529 to_state=to_state
530 )
531 )
532
533 return task
534
535 @staticmethod
536 def _get_ability_metadata_for_event_log(ability):

Callers 2

stateMethod · 0.95

Calls 2

get_serviceMethod · 0.80
fire_eventMethod · 0.45

Tested by 1