Project60 / Project60/org.project60.banking

Give API transaction analyser a max execution time

Open
#265 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
22
Forks
45
Avg merge
3d 15h
Merged PRs (30d)
7

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the civicrm_api3_banking_transaction_analyseoldest API entry point and inspect how its transaction-count argument currently controls processing. Check how PHP max_execution_time is exposed in this execution context. Done means accepting a seconds parameter and ensuring it never exceeds the configured PHP execution limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.