Invoice Broadcaster

Sends invoices to customerIDs mentioned in a text document, spawning a maximum of -m threads


Operation Command
Generate Test Data python
Execute python -m <Number Of Threads (Limited to the number of DBConnections available)>. To send out 50,000 invoices in an hour, 15 threads would be sufficient
Execute Test python -t -m <Number Of Threads (Limited to the number of DBConnections available)>


Variable Location
Sample CustomerIDs Edit 'customerIDsToGenerate' in
DB Connection Limit Edit 'maxConnections' in
No. of threads system can handle. Default: 30 Edit 'maxThreadsOnSystem' in

Source Description

File Description Python script to generate sample CustomerIDs
customerID.txt Sample CustomerIDs data
customerID-test.txt Test version of the above file Entry point. Spawns a maximum of '-m' threads to process invoice Business logic. Processes invoice Mock DB Class Mock Invoice Class


Unit / Concurrency tests exist in the below files

Trial Runs

50,000 invoices were sent out in 3387 seconds (57 minutes) when run with 15 threads