(self)
| 65 | return self.node_chunk_list.__contains__(node_chunk) |
| 66 | |
| 67 | def pop(self): |
| 68 | if self.current_node_chunk is None: |
| 69 | try: |
| 70 | current_node_chunk = self.node_chunk_list.pop(0) |
| 71 | self.current_node_chunk = current_node_chunk |
| 72 | except IndexError as e: |
| 73 | pass |
| 74 | if self.current_node_chunk is not None: |
| 75 | try: |
| 76 | chunk = self.current_node_chunk.chunk_list.pop(0) |
| 77 | return chunk |
| 78 | except IndexError as e: |
| 79 | if self.current_node_chunk.is_end(): |
| 80 | self.current_node_chunk = None |
| 81 | if self.work_flow.answer_is_not_empty(): |
| 82 | chunk = self.work_flow.base_to_response.to_stream_chunk_response( |
| 83 | self.work_flow.params['chat_id'], |
| 84 | self.work_flow.params['chat_record_id'], |
| 85 | '\n\n', False, 0, 0) |
| 86 | self.work_flow.append_answer('\n\n') |
| 87 | return chunk |
| 88 | return self.pop() |
| 89 | return None |
| 90 | |
| 91 | |
| 92 | class WorkflowManage: |
no test coverage detected