示例#1
0
 /// <summary>
 /// Request handler thread. This thread handles requests.
 /// </summary>
 private void HandleRequests()
 {
     while (!base.shutDown)
     {
         var msg = requestQueue.DeQ();
         commObject.SetBaseDirectory(defaultConfigs[identity].BaseDirectory);
         if (msg.Command == CommCommands.EXECTESTCASES)
         {
             CreateSessionDirectory(msg);
         }
         else if (msg.Command == CommCommands.TESTFILEREQUEST)
         {
             ExecuteTestCases(msg);
         }
     }
 }
示例#2
0
 /// <summary>
 /// This method dispatches build requests to child processes whichever is ready.
 /// </summary>
 private void DispatchBuildRequests()
 {
     while (!shutDown)
     {
         CommMessage msg        = requestQueue.DeQ();
         string      builderUrl = readyQueue.DeQ();
         Console.WriteLine("Forwarding request to builder at " + builderUrl);
         msg.To = builderUrl;
         string fileName = Path.Combine(this.StoragePath, msg.Arguments[CommCommands.BuildReqArguements.PROJECT]);
         if (File.Exists(fileName))
         {
             this.commObject.PostFile(fileName, builderUrl);
             this.commObject.PostMessage(msg);
         }
     }
 }