Closed brancomat closed 4 years ago
Hi, Thanks a lot for your contribution , we had a close look at it , and would like to suggest few minors changes.. 1- make the global variable file_remover = FileRemover(), a property of the WmsServer Object itself. 2- in the function _do_cleanup 2.1: replace the print by the equivalent call to LOG.info 2.2: add a try/catch around the remove action
Thanks again Sylvie
Thanks for the suggestions, I tried to integrate them.
I'm not sure about your policy on logger levels, now the "Deleting ..." message is a debug log, while if the remove action fails it throws a LOG.exception
Few more comments from our python expert: Yes, it is perfectly right to use LOG.exception.. But he will recommend to use the following style for all the logging messages. LOG.info("MY text %s... %s", info1, info2) He also recommend to add Exception in the except directive.. Ie except Exception: Thanks again . Sylvie
I incorporated the recommendations above.
Partially addresses #10
This pull request deletes temporary files after they have been served via flask. (it seems there are several ways to achieve this so please check the code to see if it's ok for you)