I have an asp.net app that runs process on server when button is pressed. This process takes some time to execute. I need some sort of queue, which will block other users from running that proccess, when it's already started by other user, and automatically run it for user that next in queue, when it completes for previous user.
How I run the process:
protected void runSonar()
{
ProcessStartInfo ProcessInfo;
Process Process;
ProcessInfo = new ProcessStartInfo(@"D:\SonarQube\sonar-runner-2.4\bin\sonar-runner.bat", " -Dsonar.login=boiarshinov.ra -Dsonar.password=310894Qwerty -Dsonar.sources=" + path);
//ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = true;
ProcessInfo.WorkingDirectory = @"D:\SonarAnalyse\";
Process = Process.Start(ProcessInfo);
Process.WaitForExit();
generateReport(shelvesToReview);
//Process.Kill();
}
Sorry for my bad english, I hope you'll understand what I'am asking for. By the way, the process that I'm starting is SonarQube, it runs on a weak server and takes a long time to execute.
Thank you for your help.
Aucun commentaire:
Enregistrer un commentaire