Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3013


Ignore:
Timestamp:
03/12/10 13:42:37 (15 years ago)
Author:
kgrading
Message:

fixed HiveBridge and removed compile errors (#830)

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HiveGridServerWrapper.cs

    r2591 r3013  
    4848
    4949    public JobState JobState(Guid guid) {
    50       ResponseObject<SerializedJobResult> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false));
     50      ResponseObject<SerializedJob> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false));
    5151      if (response != null) {
    5252        return HeuristicLab.Grid.JobState.Busy;
     
    5757      var jobObj = CreateJobObj(engine);
    5858
    59       ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.Job> res = SavelyExecute(() => executionEngine.AddJob(jobObj));
     59      ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.JobDto> res = SavelyExecute(() => executionEngine.AddJob(jobObj));
    6060      return res == null ? Guid.Empty : res.Obj.Id;
    6161    }
    6262
    6363    public byte[] TryEndExecuteEngine(Guid guid) {
    64       ResponseObject<SerializedJobResult> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false));
     64      ResponseObject<SerializedJob> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false));
    6565      if (response != null &&
    6666        response.Success && response.Obj != null) {
    67         HeuristicLab.Hive.Engine.Job restoredJob = (HeuristicLab.Hive.Engine.Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobResultData);
     67        HeuristicLab.Hive.Engine.Job restoredJob = (HeuristicLab.Hive.Engine.Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobData);
    6868        // only return the engine when it wasn't canceled (result is only a snapshot)
    6969        if (restoredJob.Progress == 1.0) {
     
    8686
    8787    private HeuristicLab.Hive.Contracts.BusinessObjects.SerializedJob CreateJobObj(byte[] serializedEngine) {
    88       HeuristicLab.Hive.Contracts.BusinessObjects.Job jobObj = new HeuristicLab.Hive.Contracts.BusinessObjects.Job();
     88      HeuristicLab.Hive.Contracts.BusinessObjects.JobDto jobObj = new HeuristicLab.Hive.Contracts.BusinessObjects.JobDto();
    8989
    90       List<HivePluginInfo> requiredPlugins = new List<HivePluginInfo>();
     90      List<HivePluginInfoDto> requiredPlugins = new List<HivePluginInfoDto>();
    9191      IEngine engine = RestoreEngine(serializedEngine, requiredPlugins);
    9292
     
    119119    }
    120120
    121     private IEngine RestoreEngine(byte[] serializedEngine, List<HivePluginInfo> requiredPlugins) {
     121    private IEngine RestoreEngine(byte[] serializedEngine, List<HivePluginInfoDto> requiredPlugins) {
    122122      // unzip and restore to determine the list of required plugins (NB: inefficient!)
    123123      MemoryStream memStream = new MemoryStream(serializedEngine);
     
    144144
    145145      foreach (IPluginDescription uniquePlugin in plugins) {
    146         HivePluginInfo pluginInfo =
    147           new HivePluginInfo();
     146        HivePluginInfoDto pluginInfo =
     147          new HivePluginInfoDto();
    148148        pluginInfo.Name = uniquePlugin.Name;
    149149        pluginInfo.Version = uniquePlugin.Version.ToString();
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs

    r3011 r3013  
    422422
    423423      lblJobName.Text = currentJob.Id.ToString();
    424       progressJob.Value = (int)(currentJob.Percentage * 100);
    425       lblProgress.Text = (int)(currentJob.Percentage * 100) + "% calculated";
     424      if (currentJob.Percentage != null) {
     425        progressJob.Value = (int) (currentJob.Percentage*100);
     426        lblProgress.Text = (int) (currentJob.Percentage*100) + "% calculated";
     427      }
    426428
    427429      ListViewItem lvi = new ListViewItem();
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs

    r3011 r3013  
    103103                              " wasn't offline but hasn't sent heartbeats - setting offline");
    104104              client.State = State.offline;
    105               DaoLocator.ClientDao.Update(client);
    106               //clientAdapter.Update(client);
     105              DaoLocator.ClientDao.Update(client);             
    107106              HiveLogger.Info(this.ToString() + ": Client " + client.Id +
    108107                              " wasn't offline but hasn't sent heartbeats - Resetting all his jobs");
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/JobDao.cs

    r3011 r3013  
    102102    public Stream GetSerializedJobStream(Guid jobId) {
    103103      HiveDataContext hdc = new HiveDataContext();
    104       hdc.Transaction = null;
    105 
     104      String ConnStr = hdc.Connection.ConnectionString;
     105      SqlConnection connection = new SqlConnection(hdc.Connection.ConnectionString);     
    106106      VarBinarySource source =
    107107        new VarBinarySource(
    108           hdc.Connection as SqlConnection, null,
     108          connection, null,
    109109          "Job", "SerializedJob", "JobId", jobId);
    110110
  • trunk/sources/HeuristicLab.Hive.Server/3.2/ServiceCallInterception.cs

    r3011 r3013  
    1717      Object obj;
    1818     
    19       using (TransactionScope scope = new TransactionScope()) {
     19     // using (TransactionScope scope = new TransactionScope()) {
    2020        try {
    2121          obj = invocation.Proceed();
    22           scope.Complete();
     22     //     scope.Complete();
    2323        } finally {
    2424          ContextFactory.Context.Dispose();
     
    2727          Console.WriteLine("Disposing old Context");     
    2828        }
    29       }     
     29     // }     
    3030      Console.WriteLine(DateTime.Now + " - " + Thread.CurrentThread.ManagedThreadId + " - Leaving Method " + invocation.Method.Name);           
    3131      return obj;
Note: See TracChangeset for help on using the changeset viewer.