diff options
| author | Mark Watts <wattsmark2015@gmail.com> | 2015-10-18 19:13:58 -0500 |
|---|---|---|
| committer | Mark Watts <wattsmark2015@gmail.com> | 2015-10-18 19:13:58 -0500 |
| commit | bd1fe45c1ad6396415f15c04544caa1021ccf71e (patch) | |
| tree | b55044fe3b40914cb030c3a85becfac11c6faf9a | |
| parent | 175890e649a4b2973b328786b81f11a94d617463 (diff) | |
| download | rdflib-bd1fe45c1ad6396415f15c04544caa1021ccf71e.tar.gz | |
Bringing through timeouts for queries
| -rw-r--r-- | rdflib/plugins/stores/sparqlstore.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rdflib/plugins/stores/sparqlstore.py b/rdflib/plugins/stores/sparqlstore.py index d2789ffa..1e4ed9e5 100644 --- a/rdflib/plugins/stores/sparqlstore.py +++ b/rdflib/plugins/stores/sparqlstore.py @@ -319,9 +319,11 @@ class SPARQLStore(NSSPARQLWrapper, Store): % (" ".join("?" + str(x) for x in v), " ".join(initBindings[x].n3() for x in v)) + timeout = self.timeout self.resetQuery() if self._is_contextual(queryGraph): self.addParameter("default-graph-uri", queryGraph) + self.setTimeout(timeout) self.setQuery(query) return Result.parse(SPARQLWrapper.query(self).response) @@ -406,9 +408,11 @@ class SPARQLStore(NSSPARQLWrapper, Store): except (ValueError, TypeError, AttributeError): pass + timeout = self.timeout self.resetQuery() if self._is_contextual(context): self.addParameter("default-graph-uri", context.identifier) + self.setTimeout(timeout) self.setQuery(query) doc = ElementTree.parse(SPARQLWrapper.query(self).response) |
