C
C#2y ago
Hercules

❔ Do I need to take any extra steps to install a Windows service with Parallel.ForEach?

Is there any additional step required to install a Windows service when utilizing Parallel.ForEach, as I am encountering difficulties during the installation process? My code used to work perfectly fine before when i used async but I later noticed I needed to use multiple threads to achive better performance. So I did some updates. The new code look like this https://pastebin.com/hvntiY5U and when I deploy sc.exe create $serviceName binpath= $servicePath start= auto The Event Viewer returns: "A timeout was reached (30000 milliseconds) while waiting for the ElicitStampenScreenshots-test service to connect." "The myService service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion." Is there any abnormality with my code that creates a timeout or breaks the start process?
Pastebin
using Azure.Storage.Blobs;using Elicit_Stampen_Screenshot_WorkerSer...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
9 Replies
Ryada
Ryada2y ago
I am having trouble understanding why you would need more performance for: “opening a webbrowser navigating to a url and then making a screenshot to upload it” The main performance issue is not going to be your code
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ryada
Ryada2y ago
Yeah there are issues in the code, but I just can’t fathom needing more performance for something like this.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ryada
Ryada2y ago
I used string interpolation from time to time if I had to grab specific values that would change at high frequency But I have a lot of questions about this code 😂 I’m trying to understand what usecase it will have
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Hercules
HerculesOP2y ago
Thanks for the input. There has been massive update on the code base. The point is to navigate to multiple urls and wait for them to load front-end and back-end wise with selenum webdriver (chromedriver used). Since this need to be updated frequently i decided to use multi threading. Code looks like now https://pastebin.com/zCnEPLqR Feel free to look into it all input are welcome. I right now have problems deploying it as windows service locally I keep getting timeouts in my event viewer: The MyService1 service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. A timeout was reached (30000 milliseconds) while waiting for the MyService1 service to connect.
Pastebin
using Azure.Storage.Blobs;using Elicit_Stampen_Screenshot_WorkerSer...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Hercules
HerculesOP2y ago
@TeBeConsulting and @Ryada *ngIf="exists" Thanks guys for taking the time and effort.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server