Better process pool..
This commit is contained in:
		
							parent
							
								
									fc50e6cd4e
								
							
						
					
					
						commit
						d501aa5076
					
				
							
								
								
									
										
											BIN
										
									
								
								dist/Ragnar-1.3.37-py3-none-any.whl
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/Ragnar-1.3.37-py3-none-any.whl
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								dist/ragnar-1.3.37.tar.gz
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/ragnar-1.3.37.tar.gz
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,7 +1,7 @@ | ||||
| import argparse | ||||
| import random | ||||
| import time | ||||
| from concurrent.futures import ThreadPoolExecutor as Executor | ||||
| from concurrent.futures import ProcessPoolExecutor as Executor | ||||
| 
 | ||||
| from ragnar import log | ||||
| from ragnar.bot import Bot | ||||
| @ -31,6 +31,7 @@ def bot_task(username, password): | ||||
| 
 | ||||
| def main(): | ||||
|     args = parse_args() | ||||
| <<<<<<< HEAD | ||||
|     with Executor(500) as executor: | ||||
|         usernames = [ | ||||
|             # "no-spam1", | ||||
| @ -49,6 +50,27 @@ def main(): | ||||
|             "AmandaFloyd", | ||||
|         ] | ||||
|         for username in usernames: | ||||
| ======= | ||||
|     usernames = [ | ||||
|         # "no-spam1", | ||||
|         # "no-spam2", | ||||
|         # "no-spam3", | ||||
|         # "no-spam4", | ||||
|         # "no-spam", | ||||
|         "no-spam2353", | ||||
|         "no-spam2351", | ||||
|         "no-spam2350", | ||||
|         "no-spam2349", | ||||
|         "JamesMedina", | ||||
|         "MichelleWeeks", | ||||
|         "JaredRuiz", | ||||
|         "LoriMcgee", | ||||
|         "AmandaFloyd" | ||||
|     ] | ||||
| 
 | ||||
|     with Executor(len(usernammes) + 1) as executor: | ||||
|                 for username in usernames: | ||||
| >>>>>>> bd8abd5 (Better process pool..) | ||||
|             executor.submit(bot_task, f"{username}@molodetz.nl", args.password) | ||||
|         executor.shutdown(wait=True) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user