buchhalter-ai / buchhalter-ai-cli

The buchhalter open-source command line tool to automate invoice downloads from suppliers. Free, customizable, and designed for seamless financial workflow integration.
https://buchhalter.ai
Other
4 stars 1 forks source link

Browser: Don't abort the recipe if we downloaded files #62

Closed andygrunwald closed 3 months ago

andygrunwald commented 3 months ago

If we execute the DigitalOcean recipe with a configuration buchhalter_max_download_files_per_receipt: 0 (aka Download everything), after a few downloads the recipe will run into a timeout.

When we hit the timeout, a few documents has been downloaded, but those get discarded. Discarded means, they don't get moved into the local storage. However, only the download step timed out.

This Pull request changes the behaviour a bit: IF the downloadAll step is successful and downloaded new documents but timed out, we will NOT abort the recipe but continue with the move step.

This change doesn't need to be applied to the client package, because the download and move action is one single step (oauth2-post-and-get-items).