Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Fix/xxxx-oldSchool
  • Hotfix/2352-onlyChanged
  • Hotfix/2615-graphDeployerLag
  • Hotfix/790-orgDeploy
  • Hotfix/953-fileNameWithSpace
  • Hotfix/999-fixGraphdeployer
  • Hotfix/xxxx-directoryDependency
  • Hotfix/xxxx-fastDeployment
  • Issue/2518-docs
  • Issue/2568-betterLogging
  • Issue/2668-graphDeployer
  • Issue/2880-gd
  • Issue/2906-containerCron
  • Issue/2915-migrateSql2Linked
  • Issue/2944-gdShenanigans
  • Issue/2967-fixGD
  • Issue/2980-fixContainerBuild
  • Issue/3109-onboarding
  • Issue/3130-onboardingUzK
  • Issue/xxxx-fixDevcontainer
  • Issue/xxxx-generateLatestTag
  • Product/483-organizations
  • Product/871-generalDeployment
  • Sprint/2020-07
  • Sprint/2020-11
  • Sprint/2020-12
  • Sprint/2022-01
  • Topic/711-organizations
  • Topic/713-rwthOrgState
  • Topic/886-generalDeployment
  • dev
  • gitkeep
  • master
  • petar.hristov-master-patch-9e49
  • test_ci
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.10
  • v1.2.11
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.2.6
  • v1.2.7
  • v1.2.8
  • v1.2.9
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.1.10
  • v2.1.11
  • v2.1.2
  • v2.1.3
  • v2.1.4
  • v2.1.5
  • v2.1.6
  • v2.1.7
  • v2.1.8
  • v2.1.9
63 results

Target

Select target project
  • coscine/backend/scripts/graphdeployer
1 result
Select Git revision
  • Fix/xxxx-oldSchool
  • Hotfix/2352-onlyChanged
  • Hotfix/2615-graphDeployerLag
  • Hotfix/790-orgDeploy
  • Hotfix/953-fileNameWithSpace
  • Hotfix/999-fixGraphdeployer
  • Hotfix/xxxx-directoryDependency
  • Hotfix/xxxx-fastDeployment
  • Issue/2518-docs
  • Issue/2568-betterLogging
  • Issue/2668-graphDeployer
  • Issue/2880-gd
  • Issue/2906-containerCron
  • Issue/2915-migrateSql2Linked
  • Issue/2944-gdShenanigans
  • Issue/2967-fixGD
  • Issue/2980-fixContainerBuild
  • Issue/3109-onboarding
  • Issue/3130-onboardingUzK
  • Issue/xxxx-fixDevcontainer
  • Issue/xxxx-generateLatestTag
  • Product/483-organizations
  • Product/871-generalDeployment
  • Sprint/2020-07
  • Sprint/2020-11
  • Sprint/2020-12
  • Sprint/2022-01
  • Topic/711-organizations
  • Topic/713-rwthOrgState
  • Topic/886-generalDeployment
  • dev
  • gitkeep
  • master
  • petar.hristov-master-patch-9e49
  • test_ci
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.10
  • v1.2.11
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.2.6
  • v1.2.7
  • v1.2.8
  • v1.2.9
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.1.10
  • v2.1.11
  • v2.1.2
  • v2.1.3
  • v2.1.4
  • v2.1.5
  • v2.1.6
  • v2.1.7
  • v2.1.8
  • v2.1.9
63 results
Show changes
Commits on Source (3)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<AssemblyName>Coscine.GraphDeployer</AssemblyName> <AssemblyName>Coscine.GraphDeployer</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Version>1.2.7</Version> <Version>1.2.8</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
......
...@@ -114,11 +114,12 @@ public class Program ...@@ -114,11 +114,12 @@ public class Program
var currentGraph = Helpers.WrapRequest(() => _rdfStoreConnector.GetGraph(graphName)); var currentGraph = Helpers.WrapRequest(() => _rdfStoreConnector.GetGraph(graphName));
// Project the triples for easier comparison
var projectedGraph = graph.Triples.Select(ProjectTriple).ToList();
var projectedCurrentGraph = currentGraph.Triples.Select(ProjectTriple).ToList();
var graphWasChanged = graph.Triples.Count != currentGraph.Triples.Count var graphWasChanged = graph.Triples.Count != currentGraph.Triples.Count
|| graph.Triples.Any((triple) => !currentGraph.Triples.Any((currentTriple) => || projectedGraph.Except(projectedCurrentGraph).Any();
(triple.Subject.Equals(currentTriple.Subject) || (triple.Subject.NodeType == NodeType.Blank && currentTriple.Subject.NodeType == NodeType.Blank)
&& triple.Predicate.Equals(currentTriple.Predicate)
&& triple.Object.Equals(currentTriple.Object) || (triple.Object.NodeType == NodeType.Blank && currentTriple.Object.NodeType == NodeType.Blank))));
if (graphWasChanged) if (graphWasChanged)
{ {
...@@ -141,9 +142,9 @@ public class Program ...@@ -141,9 +142,9 @@ public class Program
else else
{ {
_logger.LogInformation("Skipping {graphName}", graphName); _logger.LogInformation("Skipping {graphName}", graphName);
} }
} }
queries.Add($"rdf_loader_run ();"); queries.Add($"rdf_loader_run ();");
queries.Add($"DELETE from DB.DBA.load_list where 1=1;"); queries.Add($"DELETE from DB.DBA.load_list where 1=1;");
...@@ -233,4 +234,11 @@ public class Program ...@@ -233,4 +234,11 @@ public class Program
LogInnerException(ex.InnerException); LogInnerException(ex.InnerException);
} }
} }
private static string ProjectTriple(Triple triple)
{
return $"{(triple.Subject.NodeType == NodeType.Blank ? "BLANK" : triple.Subject.ToString())}," +
$"{triple.Predicate.ToString()}," +
$"{(triple.Object.NodeType == NodeType.Blank ? "BLANK" : triple.Object.ToString())}";
}
} }
\ No newline at end of file