Project60 / org.project60.banking

CiviCRM banking extension
18 stars 35 forks source link

Give API transaction analyser a max execution time #265

Open pbatroff opened 4 years ago

pbatroff commented 4 years ago

API transaction analyser (civicrm_api3_banking_transaction_analyseoldest) currently has an argument to parse a number of transactions, started by the oldest one (value_date). This can potentially run into problems with larger amounts of transactions and a badly set PHP execution time when called from Cron. Instead it would make sense to change this to an execution time, and respect the php max_execution_time as well.

civicrm_api3_banking_transaction_analyseoldest should be extended to use seconds as an alternate parameter. The parameter should be in seconds, and shall not exceed the php max_execution_time configured.

jensschuppe commented 3 years ago

@pbatroff Feel free to file the changes in your fork as a PR if that's still relevant.