public void StartWorker() { ProcessStartInfo startInfo = new ProcessStartInfo("python3"); startInfo.WindowStyle = ProcessWindowStyle.Minimized; startInfo.Arguments = $"test.py tcp://127.0.0.1:{_portNumber} {_portNumber}"; ProcessAsyncHelper.RunAsync(startInfo); _consumeQueueTask = Task.Run(ConsumeQueue); }
static void Main(string[] args) { string cleaned = File.ReadAllText("data.txt").Replace("\n", "").Replace("\r", ""); int clients = int.Parse(args[0]); for (int i = 0; i < clients; i++) { System.Threading.Thread.Sleep(10000); Console.WriteLine($"starting test {i}"); ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.FileName = "RunChromeHeadLess.bat"; ProcessAsyncHelper.RunAsync(startInfo); } Console.WriteLine("Now just wait, and dont press any key"); Console.ReadKey(); }