| 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') |