Project60 / org.project60.sepa

SEPA direct debit integration with civicrm
19 stars 46 forks source link

Queue runner for 'group received' and 'delete group' actions #655

Closed bjendres closed 1 month ago

bjendres commented 1 year ago

The submission group update and the group closing process already have a queue runner to avoid PHP timeouts when the groups are large.

However, the same is needed for deleting groups and for marking them as received. Both cases also need a number of API calls that grows with the group size, and is therefore equally prone to PHP timeouts.

pminf commented 7 months ago

We also have to deal with this problem because we regularly have to close groups of around 8000 entries. Unfortunately, the user does not receive any feedback if the request generates a timeout. You only notice it within the group and that the status of the individual contributions no longer changes.

bjendres commented 7 months ago

As a workaround , you can close large groups via command line (i.e. no timeout) with cv api3 SepaAlternativeBatching.received txgroup_id=XX

That might also work for already received, incomplete groups, but please test well, I'm not sure about this one.

pminf commented 7 months ago

OK, good to know. But only admins have access to the cli, so it's not a practicable workaround for us.

bjendres commented 7 months ago

OK, good to know. But only admins have access to the cli, so it's not a practicable workaround for us.

I hope I can get to implementing this soon.

bjendres commented 4 months ago

@pminf Could you test if this version (https://github.com/Project60/org.project60.sepa/commit/c73e7133b1ce56561d6ffd06bc6c7918cee58336) works for you? If you have large SEPA group support enabled, the "mark received" should now also be executed by a runner.

pminf commented 3 months ago

@bjendres Works like charm: I've closed a group with over 7000 entries in one go without failure. Thanks!