added throttling and batch size to processing overdue loans

This commit was merged in pull request #62.
This commit is contained in:
Chinenye Nmoh
2026-01-20 14:03:39 +01:00
parent 46b3c856b1
commit f048dd99ba
4 changed files with 39 additions and 6 deletions
+7 -1
View File
@@ -53,5 +53,11 @@ class CollectLoanHelper:
"countryId": "NG",
"comment": "COLLECT LOAN"
}
@staticmethod
def chunk_list(data, chunk_size):
"""Yield successive chunk_size chunks from data."""
for i in range(0, len(data), chunk_size):
yield data[i:i + chunk_size]