Last active
July 8, 2019 05:22
-
-
Save marzdgzmn/df5b9ac3b4bff7adaa4db07ac660830d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
responses = [] | |
assemble_responses = lambda result: responses.append(result) | |
pool = mp.Pool(processes=3) | |
if name == 'MyAlert': | |
pool.apply_async(process_alerts, ('Alerts'), callback = assemble_responses) | |
else: | |
pool.apply_async(process_tickets, (name, 'Tickets'), callback = assemble_responses) | |
pool.close() | |
pool.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment