-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difference Between EndFrame and EndTaskFrame #744
Comments
Hey @golbin, I find myself referring to the Frame definitions for this.
When an So, essentially, A few additional difference to point out:
Does that help? |
Hi @markbackman, Thank you so much for your kind and detailed response. To clarify, if I want to finish processing within a processor, I can use async def process_frame(self, frame: Frame, direction: FrameDirection):
await super().process_frame(frame, direction)
if ~~~:
await self.push_frame(EndTaskFrame(), FrameDirection.UPSTREAM) On the other hand, if I want to finish outside the pipeline, I can use main_task.queue_frame(EndFrame()) And if I want to finish immediately, I can also use Is my understanding correct? |
Yes, that makes sense. Within the processor, I think you can also There might be a nuance between these two that @aconchillo can elaborate on when he returns. |
🫡 |
Description
This issue seeks clarification regarding the usage of EndFrame and EndTaskFrame.
Issue description
If this understanding is correct, it seems that the following lines in the bot examples should use EndTaskFrame instead of EndFrame.
Please let me know if I am missing something or if there’s any additional context to consider.
This clarification will help ensure consistent and accurate usage in the examples. Thank you!
The text was updated successfully, but these errors were encountered: