Beispiel #1
0
        public JobImpl(JobServer server)
        {
            this.Server = server;
            this.Id = NumJobs++;
            this.TimePosted = DateTime.Now;
            this.TimeInQueue = TimeSpan.Zero;
            this.TimeTotal = TimeSpan.Zero;

            this.Labels = DefaultLabels;
            this.BuildQuery = DefaultBuildQuery;
            this.ResultsZip = Encoding.UTF8.GetString(Properties.Resources.zip);

            this.RerunEnabled = true;

            this.Stat = new Statistics()
            {
                Id = this.Id,
                JobReceived = DateTime.Now.ToString("u"),
            };
        }
Beispiel #2
0
 public SoTImpl(JobServer server)
 {
     this.Server = server;
 }
 private Job CreateJob(out JobServer manager)
 {
     Job j;
     try
     {
         manager = (JobServer)Activator.GetObject(typeof(JobServer), JobServerConnection.OriginalString);
         j = manager.CreateJob();
     }
     catch (System.Net.Sockets.SocketException)
     {
         this.StartJobManager();
         manager = (JobServer)Activator.GetObject(typeof(JobServer), JobServerConnection.OriginalString);
         j = manager.CreateJob();
     }
     return j;
 }
 private SoT CreateSoT(out JobServer manager)
 {
     SoT sot;
     try
     {
         manager = (JobServer)Activator.GetObject(typeof(JobServer), JobServerConnection.OriginalString);
         sot = manager.CreateSoT();
     }
     catch (System.Net.Sockets.SocketException)
     {
         this.StartJobManager();
         manager = (JobServer)Activator.GetObject(typeof(JobServer), JobServerConnection.OriginalString);
         sot = manager.CreateSoT();
     }
     return sot;
 }