mylar3 / mylar3

The python3 version of the automated Comic Book downloader (cbr/cbz) for use with various download clients.
GNU General Public License v3.0
1.04k stars 115 forks source link

Exception in search blocks all new searches until mylar is restarted #352

Open miracle152005 opened 4 years ago

miracle152005 commented 4 years ago

Describe the bug If a exception happens in while doing a search the user is unable to search again until mylar is restarted. Searches are just added to the queque and kept there. The queque should be freed of the failing job and allow new jobs to run.

Could you please take a look. Thanks Best regards miracle152005

Debug Log mylar.log

Environment (please complete the following information):

barbequesauce commented 4 years ago

related to #353

evilhero commented 4 years ago

This was also addressed in #343 where I basically explained the concept behind a traceback error - and that it's almost impossible to account for every variation, which is why we ask for bug reports.

Was that answer not up to snuff or something?

miracle152005 commented 4 years ago

@evilhero : I understand your reasoning behind traceback errors. But I still think this should be handled gracefully instead of breaking the application until the next restart. The most easy way to "handle" it would be to catch all exception in search_queque. Log the tracebackerror and in the finally block release the searchblock. This way you still have the exception for the failed item but further searches still work.

At least that is how I think it could work with my knowledge about exception handling in python.

miracle152005 commented 4 years ago

I created a pull request: https://github.com/mylar3/mylar3/pull/355

Which resolves the issue by logging the exception in searchforissue and resetting the searchlock in a finally.

barbequesauce commented 4 years ago

Are we ok to close?

miracle152005 commented 4 years ago

I am ok with it not getting fixed. But there is no indicator in the Ui if the search is in a failed state. Only possibility is to search in the logs if you suspect that could be the case. Could we maybe create an improvement that sets the state of the task to failed if it will no longer be able to run without restarting the application?

barbequesauce commented 4 years ago

Sorry - i saw the PR was closed, forgot evilhero had a fix to push... stay tuned