Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12914


Ignore:
Timestamp:
08/27/15 10:03:48 (9 years ago)
Author:
ascheibe
Message:

#2388 fixed plugin queries for maintenance page

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/PluginDao.cs

    r12883 r12914  
    5757    #region String queries
    5858    private const string DeleteUnusedPluginsStringQuery = @"
    59      DELETE FROM [Plugin] WHERE [PluginId] IN (
    60      SELECT [PluginId] FROM [Plugin]
    61      EXCEPT
    62      SELECT DISTINCT [p].[PluginId] FROM [Plugin] p, [RequiredPlugins] rp
    63      WHERE [p].[PluginId] = [rp].[PluginId])";
     59     DELETE FROM [Plugin] WHERE PluginId IN (
     60     SELECT p.[PluginId] FROM [Plugin] p
     61     LEFT JOIN [RequiredPlugins] rp
     62     ON rp.PluginId = p.PluginId
     63     WHERE rp.PluginId IS NULL)";
    6464    #endregion
    6565  }
  • trunk/sources/HeuristicLab.Services.WebApp.Maintenance/3.3

    • Property svn:global-ignores set to
      bin
      obj
  • trunk/sources/HeuristicLab.Services.WebApp.Maintenance/3.3/WebApi/PluginController.cs

    r12858 r12914  
    3939      var taskDao = pm.TaskDao;
    4040      return pm.UseTransaction(() => {
    41         var taskIds = taskDao.GetAll().Select(x => x.TaskId);
    42         var usedPluginIds = requiredPluginDao.GetAll()
    43           .Where(x => taskIds.Contains(x.TaskId))
     41        var usedPluginIds = requiredPluginDao.GetAll()       
    4442          .Select(x => x.PluginId)
    45           .Distinct();
    46         var query = pluginDao.GetAll().Where(x => !usedPluginIds.Any(y => y == x.PluginId));
     43          .Distinct().ToArray();
     44        var tmpQuery = pluginDao.GetAll().Select(x=>x.PluginId).ToArray().Where(x => !usedPluginIds.Any(y => y == x)).ToArray();
     45        var query = pluginDao.GetAll().Where(x => tmpQuery.Contains(x.PluginId)).ToArray();
    4746        return new DT.PluginPage {
    4847          TotalPlugins = query.Count(),
Note: See TracChangeset for help on using the changeset viewer.