(self)
| 58 | return self.node_chunk_list.__contains__(node_chunk) |
| 59 | |
| 60 | def pop(self): |
| 61 | if self.current_node_chunk is None: |
| 62 | try: |
| 63 | current_node_chunk = self.node_chunk_list.pop(0) |
| 64 | self.current_node_chunk = current_node_chunk |
| 65 | except IndexError as e: |
| 66 | pass |
| 67 | if self.current_node_chunk is not None: |
| 68 | try: |
| 69 | chunk = self.current_node_chunk.chunk_list.pop(0) |
| 70 | return chunk |
| 71 | except IndexError as e: |
| 72 | if self.current_node_chunk.is_end(): |
| 73 | self.current_node_chunk = None |
| 74 | if self.work_flow.answer_is_not_empty(): |
| 75 | chunk = self.work_flow.base_to_response.to_stream_chunk_response( |
| 76 | self.work_flow.params['chat_id'], |
| 77 | self.work_flow.params['chat_record_id'], |
| 78 | '\n\n', False, 0, 0) |
| 79 | self.work_flow.append_answer('\n\n') |
| 80 | return chunk |
| 81 | return self.pop() |
| 82 | return None |
| 83 | |
| 84 | |
| 85 | class LoopWorkflowManage(WorkflowManage): |
nothing calls this directly
no test coverage detected