-
Notifications
You must be signed in to change notification settings - Fork 278
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
Multi-threaded API v2 handler #4970
Conversation
medusa/server/api/v2/base.py
Outdated
@@ -167,12 +234,13 @@ def create_app_handler(cls, base): | |||
|
|||
def _handle_request_exception(self, e): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can e
be changed to error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. i'll approve, up to you to merge it.
Let's keep it up2date with develop? |
There's still an issue that the errors generated inside the routes are not being handled correctly. |
Been testing this for a week now. Seems pretty stable. |
Medusa/medusa/server/api/v2/base.py Lines 89 to 95 in 688f4a6
I still think that solution is a bit crude, but I don't have any better ideas at the moment. |
It can handle more threads. It will always wait for the process thats providing its result |
Oh this is unrelated to 3351 |
Is the GUI still unresponsive when post processing? |
I havent really noticed that myself. But ideally the periodic postprocessing should still be moved to a thread. |
I do it when a download is done by calling the API. So in occasion when I browse Medusa it will hang because it is post processing in the back end. |
One thing to watch for is locked threads due to failed post processing. They will lock up resources. This happens most commonly when trying to postprocess an invalid rar file. |
Medusa will never encounter a rare in my environment as I already unrar files with a post process script that is kicked off when qbitorrent finishes the download, the last step is calling the Medusa api to post process. |
@Rouzax It may not in your environment but it has been a repeat issue for users ever since before we forked from SickRage. |
Fixes #4963