Skip to content

Commit

Permalink
Set QueryTimeout to 10s.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldelaparra committed Oct 24, 2021
1 parent db1ba21 commit 7eab9fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions SparqlForHumans.Lucene/Queries/Graph/QueryGraphResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public void GetGraphQueryResults(QueryGraph graph, string entitiesIndexPath, str

var tasks = runOnEndpoint ? RunWikidataEndpointQueries(graph, 1000) : new List<Task<SparqlResultSet>>();

if (runNodeQueries) RunNodeQueries(graph);
if (runNodeQueries)
RunNodeQueries(graph);

RunEdgeQueries(graph);

Expand Down Expand Up @@ -231,8 +232,7 @@ private void RunNodeQueries(QueryGraph graph)
if (node.IsInstanceOf)
{
//Intersect (Not if any, we want only the results of that instance, even if there are none):
var instanceOfResults =
new BatchIdEntityInstanceQuery(graph.EntitiesIndexPath, node.ParentTypes, 200).Query(20).ToList();
var instanceOfResults = new BatchIdEntityInstanceQuery(graph.EntitiesIndexPath, node.ParentTypes, 200).Query(20).ToList();
node.Results = instanceOfResults;
//TODO: Not sure if the previous run should consider this:
//node.Results = node.Results.Intersect(instanceOfResults).ToList();
Expand Down
2 changes: 1 addition & 1 deletion SparqlForHumans.Wikidata/Services/GraphApiQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SparqlForHumans.Wikidata.Services
{
public static class GraphApiQueries
{
public static int QueryTimeoutMs { get; set; } = 3000;
public static int QueryTimeoutMs { get; set; } = 10000;
public static SparqlResultSet RunQuery(string sparqlQuery, bool runOnEndpoint = true)
{
if (!runOnEndpoint)
Expand Down

0 comments on commit 7eab9fe

Please sign in to comment.